This is the mail archive of the gdb-patches@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: Fix HPUX compile target.h, target.c and remote.c problems


Thank you for fixing this.  Stan is right, I had to do it.


Andrew Cagney wrote:
> 
> Andrew Cagney wrote:
> >
> > Unless Stan (as head maintainer objects).  I'll rip out PARAMS for all
> > these
> > offending functions (making them all true ISO-C).
> 
> Stan objected :-)  A patch that changes the types follows.
> 
> JimB, I've more patches to follow :-)
> 
> Using both the attached patch and these patches I was able to
> successfuly configure/compile on a hpux 10.20 system vis:
> 
>         $  export CC="/opt/ansic/bin/cc -Ae +DA1.1"
>         $  ../gdb-4.18/configure
>         $  make
>         ....
> 
> Andrew
> 
>   ------------------------------------------------------------------------
> diff -r -p gdb-4.17.86/gdb/remote.c gdb-4.17.86.cagney/gdb/remote.c
> *** gdb-4.17.86/gdb/remote.c    Wed Feb  3 09:02:03 1999
> --- gdb-4.17.86.cagney/gdb/remote.c     Tue Mar 16 21:21:53 1999
> *************** static int ishex PARAMS ((int ch, int *v
> *** 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 *, char *, int *));
> 
>   static int hexnumstr PARAMS ((char *, ULONGEST));
> 
> *************** static char *unpack_nibble PARAMS ((char
> *** 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/*unsigned char*/ byte));
> 
>   static char *unpack_byte PARAMS ((char *buf, int *value));
> 
> *************** pack_nibble (buf, nibble)
> *** 693,699 ****
>   static char *
>   pack_hex_byte (pkt, byte)
>        char *pkt;
> !      unsigned char byte;
>   {
>     *pkt++ = hexchars[(byte >> 4) & 0xf];
>     *pkt++ = hexchars[(byte & 0xf)];
> --- 693,699 ----
>   static char *
>   pack_hex_byte (pkt, byte)
>        char *pkt;
> !      int byte;
>   {
>     *pkt++ = hexchars[(byte >> 4) & 0xf];
>     *pkt++ = hexchars[(byte & 0xf)];
> *************** the loaded file\n");
> *** 3045,3051 ****
> 
>   static int
>   remote_query (query_type, buf, outbuf, bufsiz)
> !      char query_type;
>        char *buf;
>        char *outbuf;
>        int *bufsiz;
> --- 3045,3051 ----
> 
>   static int
>   remote_query (query_type, buf, outbuf, bufsiz)
> !      int query_type;
>        char *buf;
>        char *outbuf;
>        int *bufsiz;
> diff -r -p gdb-4.17.86/gdb/target.c gdb-4.17.86.cagney/gdb/target.c
> *** gdb-4.17.86/gdb/target.c    Mon Jan 18 16:49:41 1999
> --- gdb-4.17.86.cagney/gdb/target.c     Tue Mar 16 21:22:34 1999
> *************** debug_to_thread_alive PARAMS ((int));
> *** 174,181 ****
>   static void
>   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
> --- 174,180 ----
>   static void
>   debug_to_stop PARAMS ((void));
> 
> ! static int debug_to_query PARAMS ((int/*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
> *************** cleanup_target (t)
> *** 439,445 ****
>     de_fault (to_notice_signals,                (void (*) PARAMS((int))) target_ignore);
>     de_fault (to_thread_alive,          (int (*) PARAMS((int))) target_ignore);
>     de_fault (to_stop,                  (void (*) PARAMS((void))) target_ignore);
> !   de_fault (to_query,                 (int (*) PARAMS((char, char*, char *, int *))) target_ignore);
>     de_fault (to_enable_exception_callback,     (struct symtab_and_line * (*) PARAMS((enum exception_event_kind, int))) nosupport_runtime);
>     de_fault (to_get_current_exception_event,   (struct exception_event_record * (*) PARAMS((void))) nosupport_runtime);
> 
> --- 438,444 ----
>     de_fault (to_notice_signals,                (void (*) PARAMS((int))) target_ignore);
>     de_fault (to_thread_alive,          (int (*) PARAMS((int))) target_ignore);
>     de_fault (to_stop,                  (void (*) PARAMS((void))) target_ignore);
> !   de_fault (to_query,                 (int (*) PARAMS((int/*char*/, char*, char *, int *))) target_ignore);
>     de_fault (to_enable_exception_callback,     (struct symtab_and_line * (*) PARAMS((enum exception_event_kind, int))) nosupport_runtime);
>     de_fault (to_get_current_exception_event,   (struct exception_event_record * (*) PARAMS((void))) nosupport_runtime);
> 
> *************** debug_to_stop ()
> *** 2429,2435 ****
> 
>   static int
>   debug_to_query (type, req, resp, siz)
> !   char type;
>     char *req;
>     char *resp;
>     int *siz;
> --- 2428,2434 ----
> 
>   static int
>   debug_to_query (type, req, resp, siz)
> !   int type;
>     char *req;
>     char *resp;
>     int *siz;
> diff -r -p gdb-4.17.86/gdb/target.h gdb-4.17.86.cagney/gdb/target.h
> *** gdb-4.17.86/gdb/target.h    Tue Jan 19 09:02:55 1999
> --- gdb-4.17.86.cagney/gdb/target.h     Tue Mar 16 21:10:20 1999
> *************** struct target_ops
> *** 355,361 ****
>     void              (*to_notice_signals) PARAMS ((int pid));
>     int       (*to_thread_alive) PARAMS ((int pid));
>     void              (*to_stop) PARAMS ((void));
> !   int               (*to_query) PARAMS ((char, char *, char *, int *));
>     struct symtab_and_line * (*to_enable_exception_callback) PARAMS ((enum exception_event_kind, int));
>     struct exception_event_record * (*to_get_current_exception_event) PARAMS ((void));
>     char *      (*to_pid_to_exec_file) PARAMS ((int pid));
> --- 355,361 ----
>     void              (*to_notice_signals) PARAMS ((int pid));
>     int       (*to_thread_alive) PARAMS ((int pid));
>     void              (*to_stop) PARAMS ((void));
> !   int               (*to_query) PARAMS ((int/*char*/, char *, char *, int *));
>     struct symtab_and_line * (*to_enable_exception_callback) PARAMS ((enum exception_event_kind, int));
>     struct exception_event_record * (*to_get_current_exception_event) PARAMS ((void));
>     char *      (*to_pid_to_exec_file) PARAMS ((int pid));