This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: More gdb-4.17.85 testresults


> 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