* Re: More gdb-4.17.85 testresults
[not found] ` <npaexm4p27.fsf.cygnus.gdb@zwingli.cygnus.com>
@ 1999-04-01 0:00 ` Andrew Cagney
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 1999-04-01 0:00 UTC (permalink / raw)
To: gdb
Jim Blandy wrote:
> Based on the responses from the ANSI C wonks, I think you're going to
> have to change the argument types in the prototypes. Glancing over
> it, this doesn't look like a problem.
Below is a somewhat pragmatic patch to address the problem (assuming
that this weeks mailer doesn't eat several long lines :-).
The thing is that the function remote_query() is assigned to
`struct target_ops'.to_query. If we're going to change the signature
of remote_query() then we'll also need to change to_query and any other
uses of it. (While there are not that many it does appear to be
excessive
effort for a problem that goes away in the next release).
I figure it is easier, for the 4.18 release, to just zap prototypes
when they create problems.
The below is for your aproval.
Andrew
*** remote.c 1999/03/10 03:27:15 1.179
--- remote.c 1999/03/12 00:46:39
*************** static int ishex PARAMS ((int ch, int *v
*** 294,301 ****
static int stubhex PARAMS ((int ch));
- static int remote_query PARAMS ((char, char *, char *, int *));
-
static int hexnumstr PARAMS ((char *, ULONGEST));
static CORE_ADDR remote_address_masked PARAMS ((CORE_ADDR));
--- 294,299 ----
*************** char *unpack_varlen_hex PARAMS ((char *b
*** 315,322 ****
static char *unpack_nibble PARAMS ((char *buf, int *val));
static char *pack_nibble PARAMS ((char *buf, int nibble));
-
- static char *pack_hex_byte PARAMS ((char *pkt, unsigned char byte));
static char *unpack_byte PARAMS ((char *buf, int *value));
--- 313,318 ----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More gdb-4.17.85 testresults
[not found] <9903039205.AA920520366.cygnus.gdb@cc.pmsc.com>
[not found] ` <npaexm4p27.fsf.cygnus.gdb@zwingli.cygnus.com>
@ 1999-04-01 0:00 ` Andrew Cagney
1999-04-01 0:00 ` Mike Vermeulen
` (3 more replies)
1 sibling, 4 replies; 7+ messages in thread
From: Andrew Cagney @ 1999-04-01 0:00 UTC (permalink / raw)
To: gdb
Hello,
[Stan, JimB, as chief maintainer and GDB 4.18 people see end]
rodneybrown@pmsc.com wrote:
> /opt/ansic/bin/cc: # hppa2.0-hp-hpux10.20
> HP92453-01 G.10.32.05 HP C Compiler
>
> cc -Ae -c -g -D__HP_CURSES \
> -I. -I../../gdb-4.17.85/gdb -I../../gdb-4.17.85/gdb/config \
> -DHAVE_CONFIG_H -I../../gdb-4.17.85/gdb/../include/opcode \
> -I../../gdb-4.17.85/gdb/../readline/.. -I../bfd \
> -I../../gdb-4.17.85/gdb/../bfd -I../../gdb-4.17.85/gdb/../include \
> -I../intl -I../../gdb-4.17.85/gdb/../intl -I../../gdb-4.17.85/gdb/tui \
> ../../gdb-4.17.85/gdb/remote.c
[...]
> cc: "../../gdb-4.17.85/gdb/remote.c", line 693: \
> error 1711: Inconsistent parameter list declaration for "pack_hex_byte".
This one puzzles me. Looking in remote.c I see:
static char *pack_hex_byte PARAMS ((char *pkt, unsigned char byte));
and then:
static char *
pack_hex_byte (pkt, byte)
char *pkt;
unsigned char byte;
{
Is this error because HP's compiler doesn't like the `unsigned char' parameter.?
> cc: "../../gdb-4.17.85/gdb/remote.c", line 3046: \
> error 1711: Inconsistent parameter list declaration for "remote_query".
>
static int remote_query PARAMS ((char, char *, char *, int *));
and:
static int
remote_query (query_type, buf, outbuf, bufsiz)
char query_type;
char *buf;
char *outbuf;
int *bufsiz;
This time I've no idea's as to what HP's ansic doesn't like about it. Any
suggestions?
Assuming that HP's compiler reporting errors because it has problems with prototyped
and non-prototyped code, I can see two solutions: disable PARAMS for that
host/compiler combination; make those problem functions part of the ANSI experiment?
Stan, JimB, thoughts?
Andrew
PS: W.R.T. the other warnings, a glance over them suggests that, while it would be
nice to clean them up, it isn't something to attempt in the GDB-4.18 time frame.
Having 4.19 compile cleanly on on a select list of hosts, however, is certainly an
achievable goal.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: More gdb-4.17.85 testresults
1999-04-01 0:00 ` Andrew Cagney
@ 1999-04-01 0:00 ` Mike Vermeulen
1999-04-01 0:00 ` Jim Blandy
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Mike Vermeulen @ 1999-04-01 0:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: mev
> This one puzzles me. Looking in remote.c I see:
>
> static char *pack_hex_byte PARAMS ((char *pkt, unsigned char byte));
>
> and then:
>
> static char *
> pack_hex_byte (pkt, byte)
> char *pkt;
> unsigned char byte;
> {
>
> Is this error because HP's compiler doesn't like the `unsigned char'
> parameter.?
Here is the issue and my reporting of the problem.
--mev, Mike Vermeulen
To: shebs@cygnus.com
Cc: mev@cup.hp.com, sanville@cup.hp.com
Subject: Building gdb-4.17.85 on HP-UX
Date: Sat, 27 Feb 1999 14:57:40 -0800
From: Mike Vermeulen <mev@cup.hp.com>
Stan,
I picked up the gdb-4.17.85 snapshot and built using HP compilers
on a 10.20 and 11.0 system. I found a few small things that prevent
gdb from building cleanly:
- sim/Makefile
Contains two lines that are commented out but
have a continuation character "\" at the end.
I don't know why our make(1) should care, but
it does. Simple enough to fix. See patch.01.
- gdb/remote.c and gdb/target.c
Both contain functions whose parameters are not the same when
default argument promotions are applied, e.g. char.
The problem arises because the C standard indicates the compiler
doesn't doesn't have to pass arguments to definition #1 or #2 in
the same way:
int func(char c){} /* defn #1 */
int func(c) char c; {} /* defn #2 */
and thus the PARAM(( )) macro expands differently. Our compiler
errs on this case. See patch.02 below.
--mev, Mike Vermeulen
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Mike Vermeulen <mev@anteater> on Sat Feb 27 14:49:26 1999
#
# This archive contains:
# patch.01 patch.02
#
LANG=""; export LANG
PATH=/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:$PATH; export PATH
echo x - patch.01
cat >patch.01 <<'@EOF'
diff -c gdb-4.17.85/sim/Makefile.in gdb-4.17.85.patched/sim/Makefile.in
*** gdb-4.17.85/sim/Makefile.in Thu May 28 12:05:30 1998
--- gdb-4.17.85.patched/sim/Makefile.in Sat Feb 27 11:53:11 1999
***************
*** 95,101 ****
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"SHELL=$(SHELL)"
! # "RUNTEST=$(RUNTEST)" \
# The use of $$(x_FOR_TARGET) reduces the command line length by not
# duplicating the lengthy definition.
--- 95,101 ----
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"SHELL=$(SHELL)"
! # "RUNTEST=$(RUNTEST)"
# The use of $$(x_FOR_TARGET) reduces the command line length by not
# duplicating the lengthy definition.
***************
*** 119,125 ****
"MAKEINFO=$(MAKEINFO)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)"
! # "RUNTEST=$(RUNTEST)" \
all:
--- 119,125 ----
"MAKEINFO=$(MAKEINFO)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)"
! # "RUNTEST=$(RUNTEST)"
all:
Common subdirectories: gdb-4.17.85/sim/arm and gdb-4.17.85.patched/sim/arm
Common subdirectories: gdb-4.17.85/sim/common and gdb-4.17.85.patched/sim/common
Common subdirectories: gdb-4.17.85/sim/d10v and gdb-4.17.85.patched/sim/d10v
Common subdirectories: gdb-4.17.85/sim/d30v and gdb-4.17.85.patched/sim/d30v
Common subdirectories: gdb-4.17.85/sim/erc32 and gdb-4.17.85.patched/sim/erc32
Common subdirectories: gdb-4.17.85/sim/fr30 and gdb-4.17.85.patched/sim/fr30
Common subdirectories: gdb-4.17.85/sim/h8300 and gdb-4.17.85.patched/sim/h8300
Common subdirectories: gdb-4.17.85/sim/h8500 and gdb-4.17.85.patched/sim/h8500
Common subdirectories: gdb-4.17.85/sim/i960 and gdb-4.17.85.patched/sim/i960
Common subdirectories: gdb-4.17.85/sim/igen and gdb-4.17.85.patched/sim/igen
Common subdirectories: gdb-4.17.85/sim/m32r and gdb-4.17.85.patched/sim/m32r
Common subdirectories: gdb-4.17.85/sim/mips and gdb-4.17.85.patched/sim/mips
Common subdirectories: gdb-4.17.85/sim/mn10200 and gdb-4.17.85.patched/sim/mn10200
Common subdirectories: gdb-4.17.85/sim/mn10300 and gdb-4.17.85.patched/sim/mn10300
Common subdirectories: gdb-4.17.85/sim/ppc and gdb-4.17.85.patched/sim/ppc
Common subdirectories: gdb-4.17.85/sim/sh and gdb-4.17.85.patched/sim/sh
Common subdirectories: gdb-4.17.85/sim/testsuite and gdb-4.17.85.patched/sim/testsuite
Common subdirectories: gdb-4.17.85/sim/v850 and gdb-4.17.85.patched/sim/v850
Common subdirectories: gdb-4.17.85/sim/w65 and gdb-4.17.85.patched/sim/w65
Common subdirectories: gdb-4.17.85/sim/z8k and gdb-4.17.85.patched/sim/z8k
@EOF
chmod 664 patch.01
echo x - patch.02
cat >patch.02 <<'@EOF'
Common subdirectories: gdb-4.17.85/gdb/29k-share and gdb-4.17.85.patched/gdb/29k-share
Common subdirectories: gdb-4.17.85/gdb/config and gdb-4.17.85.patched/gdb/config
Common subdirectories: gdb-4.17.85/gdb/doc and gdb-4.17.85.patched/gdb/doc
Common subdirectories: gdb-4.17.85/gdb/gdbserver and gdb-4.17.85.patched/gdb/gdbserver
Common subdirectories: gdb-4.17.85/gdb/nindy-share and gdb-4.17.85.patched/gdb/nindy-share
Common subdirectories: gdb-4.17.85/gdb/nlm and gdb-4.17.85.patched/gdb/nlm
Common subdirectories: gdb-4.17.85/gdb/osf-share and gdb-4.17.85.patched/gdb/osf-share
Common subdirectories: gdb-4.17.85/gdb/rdi-share and gdb-4.17.85.patched/gdb/rdi-share
diff -c gdb-4.17.85/gdb/remote.c gdb-4.17.85.patched/gdb/remote.c
*** gdb-4.17.85/gdb/remote.c Wed Feb 3 09:02:03 1999
--- gdb-4.17.85.patched/gdb/remote.c Sat Feb 27 12:00:53 1999
***************
*** 293,299 ****
static int stubhex PARAMS ((int ch));
! static int remote_query PARAMS ((char, char *, char *, int *));
static int hexnumstr PARAMS ((char *, ULONGEST));
--- 293,299 ----
static int stubhex PARAMS ((int ch));
! static int remote_query PARAMS ((int, char *, char *, int *));
static int hexnumstr PARAMS ((char *, ULONGEST));
***************
*** 315,321 ****
static char *pack_nibble PARAMS ((char *buf, int nibble));
! static char *pack_hex_byte PARAMS ((char *pkt, unsigned char byte));
static char *unpack_byte PARAMS ((char *buf, int *value));
--- 315,321 ----
static char *pack_nibble PARAMS ((char *buf, int nibble));
! static char *pack_hex_byte PARAMS ((char *pkt, int byte));
static char *unpack_byte PARAMS ((char *buf, int *value));
diff -c gdb-4.17.85/gdb/target.c gdb-4.17.85.patched/gdb/target.c
*** gdb-4.17.85/gdb/target.c Mon Jan 18 16:49:41 1999
--- gdb-4.17.85.patched/gdb/target.c Sat Feb 27 11:59:53 1999
***************
*** 175,181 ****
debug_to_stop PARAMS ((void));
static int
! debug_to_query PARAMS ((char, char *, char *, int *));
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
--- 175,181 ----
debug_to_stop PARAMS ((void));
static int
! debug_to_query PARAMS ((int, char *, char *, int *));
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
Common subdirectories: gdb-4.17.85/gdb/testsuite and gdb-4.17.85.patched/gdb/testsuite
Common subdirectories: gdb-4.17.85/gdb/tui and gdb-4.17.85.patched/gdb/tui
Common subdirectories: gdb-4.17.85/gdb/vx-share and gdb-4.17.85.patched/gdb/vx-share
@EOF
chmod 664 patch.02
exit 0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: More gdb-4.17.85 testresults
1999-04-01 0:00 ` Andrew Cagney
1999-04-01 0:00 ` Mike Vermeulen
@ 1999-04-01 0:00 ` Jim Blandy
1999-04-01 0:00 ` Stan Shebs
1999-04-01 0:00 ` Todd Whitesel
3 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 1999-04-01 0:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
I'm not concerned with a warning-free build for 4.18. That is
something I would like to have for 4.19.
Based on the responses from the ANSI C wonks, I think you're going to
have to change the argument types in the prototypes. Glancing over
it, this doesn't look like a problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More gdb-4.17.85 testresults
1999-04-01 0:00 ` Andrew Cagney
1999-04-01 0:00 ` Mike Vermeulen
1999-04-01 0:00 ` Jim Blandy
@ 1999-04-01 0:00 ` Stan Shebs
1999-04-01 0:00 ` Todd Whitesel
3 siblings, 0 replies; 7+ messages in thread
From: Stan Shebs @ 1999-04-01 0:00 UTC (permalink / raw)
To: cagney; +Cc: gdb
Date: Tue, 09 Mar 1999 15:20:06 +1100
From: Andrew Cagney <ac131313@cygnus.com>
> cc: "../../gdb-4.17.85/gdb/remote.c", line 3046: \
> error 1711: Inconsistent parameter list declaration for "remote_query".
>
static int remote_query PARAMS ((char, char *, char *, int *));
and:
static int
remote_query (query_type, buf, outbuf, bufsiz)
char query_type;
char *buf;
char *outbuf;
int *bufsiz;
This time I've no idea's as to what HP's ansic doesn't like about it. Any
suggestions?
The actual problem is that the function definition is "K&R style" not
true ANSI, but in any case the right solution is to change the first
arg from "char" to "int". While there may be situations where you
really need an argument to be declared "char", in 20 years of C
programming I've only seen one case (certain Mac Toolbox calls) where
having a char arg was important, and dozens of cases where it just
made problems for no good reason.
(This one is a little embarassing, because I went over the remote_query
code, and missed it...)
Stan
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: More gdb-4.17.85 testresults
1999-04-01 0:00 ` Andrew Cagney
` (2 preceding siblings ...)
1999-04-01 0:00 ` Stan Shebs
@ 1999-04-01 0:00 ` Todd Whitesel
3 siblings, 0 replies; 7+ messages in thread
From: Todd Whitesel @ 1999-04-01 0:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
> > cc: "../../gdb-4.17.85/gdb/remote.c", line 693: \
> > error 1711: Inconsistent parameter list declaration for "pack_hex_byte".
>
> This one puzzles me. Looking in remote.c I see:
>
> static char *pack_hex_byte PARAMS ((char *pkt, unsigned char byte));
>
> and then:
>
> static char *
> pack_hex_byte (pkt, byte)
> char *pkt;
> unsigned char byte;
> {
>
>Is this error because HP's compiler doesn't like the `unsigned char' parameter?
Yes, in both cases. This is a pedanticism of the HP compiler; it considers
the prototype to have ANSI argument conventions (char and unsigned char
really are only 8 bits) but it considers the definition to have K&R argument
conventions (char and unsigned char are implicitly promoted to int).
Most compilers recognize this case and accept it as a K&R->ANSI transition
tool, but the HP/UX compiler insists that the two prototypes are not the
same and rejects it.
Solutions:
- widen the chars to ints
- move to ANSI prototypes
- disable PARAMS() on that host until ANSIfication proceeds
--
Todd Whitesel
toddpw @ wrs.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* More gdb-4.17.85 testresults
@ 1999-04-01 0:00 rodneybrown
0 siblings, 0 replies; 7+ messages in thread
From: rodneybrown @ 1999-04-01 0:00 UTC (permalink / raw)
To: gdb
/opt/ansic/bin/cc: # hppa2.0-hp-hpux10.20
HP92453-01 G.10.32.05 HP C Compiler
cc -Ae -c -g -D__HP_CURSES \
-I. -I../../gdb-4.17.85/gdb -I../../gdb-4.17.85/gdb/config \
-DHAVE_CONFIG_H -I../../gdb-4.17.85/gdb/../include/opcode \
-I../../gdb-4.17.85/gdb/../readline/.. -I../bfd \
-I../../gdb-4.17.85/gdb/../bfd -I../../gdb-4.17.85/gdb/../include \
-I../intl -I../../gdb-4.17.85/gdb/../intl -I../../gdb-4.17.85/gdb/tui \
../../gdb-4.17.85/gdb/remote.c
cc: "../../gdb-4.17.85/gdb/value.h", line 252: \
warning 617: Redeclaration of tag "frame_info" ignored.
cc: "../../gdb-4.17.85/gdb/value.h", line 253: \
warning 617: Redeclaration of tag "fn_field" ignored.
cc: "../../gdb-4.17.85/gdb/breakpoint.h", line 447: \
warning 617: Redeclaration of tag "frame_info" ignored.
cc: "../../gdb-4.17.85/gdb/remote.c", line 693: \
error 1711: Inconsistent parameter list declaration for "pack_hex_byte".
cc: "../../gdb-4.17.85/gdb/remote.c", line 838: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 952: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 952: \
warning 563: Argument #2 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 1748: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 1748: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 1806: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 1806: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2134: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2134: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2136: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2136: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2146: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2146: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2177: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2177: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2178: \
warning 604: Pointers are not assignment-compatible.
cc: "../../gdb-4.17.85/gdb/remote.c", line 2178: \
warning 563: Argument #1 is not the correct type.
cc: "../../gdb-4.17.85/gdb/remote.c", line 3046: \
error 1711: Inconsistent parameter list declaration for "remote_query".
make[1]: *** [remote.o] Error 1
make[1]: Leaving directory `/devel/span/rdb/src/gdb-4.17.85.obj.hpc/gdb'
make: *** [all-gdb] Error 2
Results for build using egcs-1.1
Native configuration is hppa2.0-hp-hpux10.20
=== gdb Summary ===
# of expected passes 5868
# of unexpected failures 279
# of unexpected successes 4
# of expected failures 160
# of unresolved testcases 7
# of unsupported tests 1
/devel/span/rdb/src/gdb-4.17.85.obj/gdb/testsuite/../../gdb/gdb version 4.17.85
-nx
Compiler version: 4.17.85 -nx gdb
Platform: hppa2.0-hp-hpux10.20
configure flags: --host=hppa2.0-hp-hpux10.20 --norecursion
Native configuration is alpha-dec-osf3.2
=== gdb Summary ===
# of expected passes 5026
# of unexpected failures 914
# of unexpected successes 4
# of expected failures 162
# of unresolved testcases 8
/usr1/users/rdb/src/gdb-4.17.85.obj/gdb/testsuite/../../gdb/gdb version 4.17.85
-nx
Compiler version: 4.17.85 -nx gdb
Platform: alpha-dec-osf3.2
configure flags: --host=alpha-dec-osf3.2 --norecursion
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1999-04-01 0:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <9903039205.AA920520366.cygnus.gdb@cc.pmsc.com>
[not found] ` <npaexm4p27.fsf.cygnus.gdb@zwingli.cygnus.com>
1999-04-01 0:00 ` More gdb-4.17.85 testresults Andrew Cagney
1999-04-01 0:00 ` Andrew Cagney
1999-04-01 0:00 ` Mike Vermeulen
1999-04-01 0:00 ` Jim Blandy
1999-04-01 0:00 ` Stan Shebs
1999-04-01 0:00 ` Todd Whitesel
1999-04-01 0:00 rodneybrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox