Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Link remote target with svr4 solibs.
@ 2001-03-12 16:13 Michael Snyder
       [not found] ` <5m1ys2cxxt.fsf@jtc.redback.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Snyder @ 2001-03-12 16:13 UTC (permalink / raw)
  To: gdb-patches; +Cc: cagney, kevinb, hunt, jsmith, jtc

The following change is necessary in order to activate svr4 solib debugging
for remote targets.  With it, GDB will detect when the remote target loads
a new shared library (using the method implemented in solib-svr4.c), and
GDB will load the symbols for the library (provided that GDB has been told
where to find the symbol files, using the "set solib-search-path" and
"set solib-absolute-prefix" commands.
2001-03-12  Michael Snyder  <msnyder@redhat.com>

	* remote.c (remote_open): On opening the remote target, activate
	the solib_create_inferior_hook, so that it can detect when the
	target loads shared libraries.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.41
diff -c -3 -p -r1.41 remote.c
*** remote.c	2001/03/06 08:21:13	1.41
--- remote.c	2001/03/12 23:58:32
*************** static void
*** 2002,2007 ****
--- 2002,2011 ----
  remote_open (char *name, int from_tty)
  {
    remote_open_1 (name, from_tty, &remote_ops, 0);
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
+   if (exec_bfd) 	/* No use without an exec file. */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* Just like remote_open, but with asynchronous support. */
From jtc@redback.com Mon Mar 12 16:30:00 2001
From: jtc@redback.com (J.T. Conklin)
To: Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sources.redhat.com, cagney@redhat.com, kevinb@redhat.com, hunt@redhat.com, jsmith@redhat.com
Subject: Re: [RFA] Link remote target with svr4 solibs.
Date: Mon, 12 Mar 2001 16:30:00 -0000
Message-id: <5m1ys2cxxt.fsf@jtc.redback.com>
References: <3AAD635C.DAE5D340@cygnus.com>
X-SW-Source: 2001-03/msg00177.html
Content-length: 1013

>>>>> "Michael" == Michael Snyder <msnyder@cygnus.com> writes:
Michael> The following change is necessary in order to activate svr4
Michael> solib debugging for remote targets.  With it, GDB will detect
Michael> when the remote target loads a new shared library (using the
Michael> method implemented in solib-svr4.c), and GDB will load the
Michael> symbols for the library (provided that GDB has been told
Michael> where to find the symbol files, using the "set
Michael> solib-search-path" and "set solib-absolute-prefix"

If I understand the shared library implementation correctly, a magic
breakpoint is inserted in the dynamic loader, which when hit GDB does
normal reads and writes to determine what shared library has been
loaded or unloaded, etc.  If so, practically any remote back end
(perhaps a ROM monitor interface) will provide the infrastructure
required for this to work.

Doesn't this argue that this should reside somewhere above
remote_open()?

        --jtc

-- 
J.T. Conklin
RedBack Networks


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
       [not found] ` <5m1ys2cxxt.fsf@jtc.redback.com>
@ 2001-03-12 16:38   ` Andrew Cagney
  2001-03-12 16:44     ` J.T. Conklin
       [not found]   ` <3AAD6D7D.77A18268@cygnus.com>
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2001-03-12 16:38 UTC (permalink / raw)
  To: jtc; +Cc: Michael Snyder, gdb-patches, cagney, kevinb, hunt, jsmith

> Doesn't this argue that this should reside somewhere above
> remote_open()?

Just an asside (something I do know about :-).

Nothing can reside above remote_open().  remote_open() is called direct
from the CLI with no arguments and no context.  I've a grype about this
in the TODO file.

Look for ``Fix implementation of  ``target xxx''.''

	Andrew


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
  2001-03-12 16:38   ` Andrew Cagney
@ 2001-03-12 16:44     ` J.T. Conklin
  0 siblings, 0 replies; 8+ messages in thread
From: J.T. Conklin @ 2001-03-12 16:44 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Michael Snyder, gdb-patches, cagney, kevinb, hunt, jsmith

>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> Doesn't this argue that this should reside somewhere above
>> remote_open()?

Andrew> Just an asside (something I do know about :-).

Andrew> Nothing can reside above remote_open().  

Of course it can, all we have to do is fix the following.  A simple matter of programming :-)

Andrew> remote_open() is called direct from the CLI with no arguments
Andrew> and no context.  I've a grype about this in the TODO file.
Andrew>
Andrew> Look for ``Fix implementation of  ``target xxx''.''

Someday, in my copious free time, I'm going to have to make a stab at
fixing that, just so you'll have to find something else to gripe about
:-)

        --jtc

-- 
J.T. Conklin
RedBack Networks


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
       [not found]   ` <3AAD6D7D.77A18268@cygnus.com>
@ 2001-03-13  8:52     ` Andrew Cagney
  2001-03-13 10:31       ` Michael Snyder
  2001-03-13 11:19       ` J.T. Conklin
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Cagney @ 2001-03-13  8:52 UTC (permalink / raw)
  To: Michael Snyder; +Cc: jtc, gdb-patches, cagney, kevinb, hunt, jsmith

Michael Snyder wrote:

> > Doesn't this argue that this should reside somewhere above
> > remote_open()?
> 
> I'm open to suggestions.  The other place from which it is called
> is fork_inferior.  Remote targets do not fork.  Open is the best
> place I could think of.

Two thoughts.

remote_open_1()/remote_async_open_1() are slightly less painful than
remote_open().

Given the current arrangement, there isn't much choice.

Assuming ok with J.T. as well, can you add it to those functions along
with a FIXME.  Plenty of other examples can already be found.

	Andrew


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
  2001-03-13  8:52     ` Andrew Cagney
@ 2001-03-13 10:31       ` Michael Snyder
  2001-03-13 11:19       ` J.T. Conklin
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2001-03-13 10:31 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: jtc, gdb-patches

Andrew Cagney wrote:
> 
> Michael Snyder wrote:
> 
> > > Doesn't this argue that this should reside somewhere above
> > > remote_open()?
> >
> > I'm open to suggestions.  The other place from which it is called
> > is fork_inferior.  Remote targets do not fork.  Open is the best
> > place I could think of.
> 
> Two thoughts.
> 
> remote_open_1()/remote_async_open_1() are slightly less painful than
> remote_open().
> 
> Given the current arrangement, there isn't much choice.
> 
> Assuming ok with J.T. as well, can you add it to those functions along
> with a FIXME.  Plenty of other examples can already be found.

OK with you, JT?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
  2001-03-13  8:52     ` Andrew Cagney
  2001-03-13 10:31       ` Michael Snyder
@ 2001-03-13 11:19       ` J.T. Conklin
  2001-03-13 16:02         ` Michael Snyder
  2001-04-17 13:29         ` Michael Snyder
  1 sibling, 2 replies; 8+ messages in thread
From: J.T. Conklin @ 2001-03-13 11:19 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Michael Snyder, gdb-patches, cagney, kevinb, hunt, jsmith

>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
Andrew> Assuming ok with J.T. as well, can you add it to those functions along
Andrew> with a FIXME.  Plenty of other examples can already be found.

I was going to mention this yesterday as well.  I don't want to be
unreasonable and make you fix the problems with the _open vector, but
I do want the code marked so once that is fixed it can be migrated to
the proper place.  So as long as you add a FIXME, the change is OK by
me.

        --jtc


-- 
J.T. Conklin
RedBack Networks


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
  2001-03-13 11:19       ` J.T. Conklin
@ 2001-03-13 16:02         ` Michael Snyder
  2001-04-17 13:29         ` Michael Snyder
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2001-03-13 16:02 UTC (permalink / raw)
  To: jtc; +Cc: Andrew Cagney, gdb-patches, cagney

"J.T. Conklin" wrote:
> 
> >>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
> Andrew> Assuming ok with J.T. as well, can you add it to those functions along
> Andrew> with a FIXME.  Plenty of other examples can already be found.
> 
> I was going to mention this yesterday as well.  I don't want to be
> unreasonable and make you fix the problems with the _open vector, but
> I do want the code marked so once that is fixed it can be migrated to
> the proper place.  So as long as you add a FIXME, the change is OK by
> me.

How's the following?  Sorry, the context for the patch is snafu -- 
they are in remote_open_1 and remote_async_open_1, at the end of each.
Also I changed the comment because the appostrophe was messing up
auto-indent in emacs (dunno why, emacs bug I guess).
2001-03-12  Michael Snyder  <msnyder@redhat.com>

	* remote.c (remote_open_1): On opening the remote target, activate
	the solib_create_inferior_hook, so that it can detect when the
	target loads shared libraries.
	(remote_async_open_1): Ditto.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.41
diff -c -3 -p -r1.41 remote.c
*** remote.c	2001/03/06 08:21:13	1.41
--- remote.c	2001/03/13 23:58:56
*************** serial device is attached to the remote 
*** 2114,2124 ****
  
    if (extended_p)
      {
!       /* tell the remote that we're using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
  }
  
  /* Just like remote_open but with asynchronous support. */
--- 2114,2133 ----
  
    if (extended_p)
      {
!       /* tell the remote that we are using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
+   /* FIXME: need a master target_open vector from which all 
+      remote_opens can be called, so that stuff like this can 
+      go there.  Failing that, the following code must be copied
+      to the open function for any remote target that wants to 
+      support svr4 shared libraries.  */
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
+   if (exec_bfd) 	/* No use without an exec file. */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* Just like remote_open but with asynchronous support. */
*************** serial device is attached to the remote 
*** 2208,2218 ****
  
    if (extended_p)
      {
!       /* tell the remote that we're using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
  }
  
  /* This takes a program previously attached to and detaches it.  After
--- 2217,2236 ----
  
    if (extended_p)
      {
!       /* tell the remote that we are using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
+   /* FIXME: need a master target_open vector from which all 
+      remote_opens can be called, so that stuff like this can 
+      go there.  Failing that, the following code must be copied
+      to the open function for any remote target that wants to 
+      support svr4 shared libraries.  */
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
+   if (exec_bfd) 	/* No use without an exec file. */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* This takes a program previously attached to and detaches it.  After
From ac131313@cygnus.com Tue Mar 13 16:02:00 2001
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [rfc] Include "regcache.h" in {nm,tm,xm]-*.h files
Date: Tue, 13 Mar 2001 16:02:00 -0000
Message-id: <3AAEB419.F0A2EACF@cygnus.com>
X-SW-Source: 2001-03/msg00198.html
Content-length: 23561

Hello,

The attatched patch explicitly includes "regcache.h" into any
{nm,tm,xm]-*.h file that has a reference to one of the
functions/variables declared in regcache.h.

This is so that I'm 100% certain that moving declaration to regcache.h
didn't some how break a target.  As they say, it is brutal but it works.

	Andrew
2001-03-13  Andrew Cagney  <ac131313@redhat.com>

	* config/mips/tm-mips.h: Include "regcache.h" for macros refering
	to regcache functions.
	* config/mcore/tm-mcore.h: Ditto.
	* config/m88k/tm-m88k.h: Ditto.
	* config/m68k/tm-news.h: Ditto.
	* config/m68k/tm-linux.h: Ditto.
	* config/m68k/tm-delta68.h: Ditto.
	* config/m68k/nm-sun3.h: Ditto.
	* config/m32r/tm-m32r.h: Ditto.
	* config/i386/tm-symmetry.h: Ditto.
	* config/i386/tm-sun386.h: Ditto.
	* config/i386/tm-i386.h: Ditto.
	* config/i386/nm-symmetry.h: Ditto.
	* config/i386/nm-sun386.h: Ditto.
	* config/i386/nm-ptx4.h: Ditto.
	* config/i386/nm-i386mach.h: Ditto.
	* config/h8500/tm-h8500.h: Ditto.
	* config/h8300/tm-h8300.h: Ditto.
	* config/fr30/tm-fr30.h: Ditto.
	* config/d30v/tm-d30v.h: Ditto.
	* config/arm/tm-arm.h: Ditto.
	* config/arc/tm-arc.h: Ditto.
	* config/alpha/tm-alpha.h: Ditto.
	* config/a29k/tm-vx29k.h: Ditto.
	* config/a29k/tm-a29k.h: Ditto.
	* config/w65/tm-w65.h: Ditto.
	* config/vax/tm-vax.h: Ditto.
	* config/v850/tm-v850.h: Ditto.
	* config/tic80/tm-tic80.h: Ditto.
	* config/sparc/tm-sparclite.h: Ditto.
	* config/sparc/tm-sparclet.h: Ditto.
	* config/sparc/tm-sparc.h: Ditto.
	* config/sparc/nm-sun4sol2.h: Ditto.
	* config/sparc/nm-sun4os4.h: Ditto.
	* config/sparc/nm-nbsd.h: Ditto.
	* config/powerpc/nm-solaris.h: Ditto.
	* config/pa/tm-hppao.h: Ditto.
	* config/pa/tm-hppa.h: Ditto.
	* config/pa/nm-hppab.h: Ditto.
	* config/ns32k/tm-umax.h: Ditto.
	* config/ns32k/tm-merlin.h: Ditto.
	* config/nm-m3.h: Ditto.
	* config/nm-gnu.h: Ditto.

Index: config/nm-gnu.h
===================================================================
RCS file: /cvs/src/src/gdb/config/nm-gnu.h,v
retrieving revision 1.2
diff -p -r1.2 nm-gnu.h
*** nm-gnu.h	2001/03/06 08:21:20	1.2
--- nm-gnu.h	2001/03/13 23:55:11
***************
*** 25,30 ****
--- 25,31 ----
  #include <unistd.h>
  #include <mach.h>
  #include <mach/exception.h>
+ #include "regcache.h"
  
  extern char *gnu_target_pid_to_str (int pid);
  
Index: config/nm-m3.h
===================================================================
RCS file: /cvs/src/src/gdb/config/nm-m3.h,v
retrieving revision 1.2
diff -p -r1.2 nm-m3.h
*** nm-m3.h	2001/03/06 08:21:20	1.2
--- nm-m3.h	2001/03/13 23:55:11
***************
*** 23,28 ****
--- 23,29 ----
  #define NM_M3_H
  
  #include <mach.h>
+ #include "regcache.h"
  
  /* Mach3 doesn't declare errno in <errno.h>.  */
  extern int errno;
Index: config/a29k/tm-a29k.h
===================================================================
RCS file: /cvs/src/src/gdb/config/a29k/tm-a29k.h,v
retrieving revision 1.4
diff -p -r1.4 tm-a29k.h
*** tm-a29k.h	2001/03/06 08:21:20	1.4
--- tm-a29k.h	2001/03/13 23:55:11
***************
*** 20,25 ****
--- 20,27 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Parameters for an EB29K (a board which plugs into a PC and is
     accessed through EBMON software running on the PC, which we
     use as we'd use a remote stub (see remote-eb.c).
Index: config/a29k/tm-vx29k.h
===================================================================
RCS file: /cvs/src/src/gdb/config/a29k/tm-vx29k.h,v
retrieving revision 1.3
diff -p -r1.3 tm-vx29k.h
*** tm-vx29k.h	2001/03/06 08:21:20	1.3
--- tm-vx29k.h	2001/03/13 23:55:12
***************
*** 19,24 ****
--- 19,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
  #include "a29k/tm-a29k.h"
  #include "tm-vxworks.h"
  
Index: config/alpha/tm-alpha.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/tm-alpha.h,v
retrieving revision 1.5
diff -p -r1.5 tm-alpha.h
*** tm-alpha.h	2001/03/06 08:21:21	1.5
--- tm-alpha.h	2001/03/13 23:55:12
***************
*** 23,28 ****
--- 23,29 ----
  #ifndef TM_ALPHA_H
  #define TM_ALPHA_H
  
+ #include "regcache.h"
  #include "bfd.h"
  #include "coff/sym.h"		/* Needed for PDR below.  */
  #include "coff/symconst.h"
Index: config/arc/tm-arc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arc/tm-arc.h,v
retrieving revision 1.4
diff -p -r1.4 tm-arc.h
*** tm-arc.h	2001/03/06 08:21:21	1.4
--- tm-arc.h	2001/03/13 23:55:12
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Used by arc-tdep.c to set the default cpu type.  */
  #define DEFAULT_ARC_CPU_TYPE "base"
  
Index: config/arm/tm-arm.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-arm.h,v
retrieving revision 1.5
diff -p -r1.5 tm-arm.h
*** tm-arm.h	2001/03/06 08:21:21	1.5
--- tm-arm.h	2001/03/13 23:55:12
***************
*** 22,27 ****
--- 22,29 ----
  #ifndef TM_ARM_H
  #define TM_ARM_H
  
+ #include "regcache.h"
+ 
  /* Forward declarations for prototypes.  */
  struct type;
  struct value;
Index: config/d30v/tm-d30v.h
===================================================================
RCS file: /cvs/src/src/gdb/config/d30v/tm-d30v.h,v
retrieving revision 1.3
diff -p -r1.3 tm-d30v.h
*** tm-d30v.h	2001/03/06 08:21:25	1.3
--- tm-d30v.h	2001/03/13 23:55:13
***************
*** 21,26 ****
--- 21,28 ----
  #ifndef TM_D30V_H
  #define TM_D30V_H
  
+ #include "regcache.h"
+ 
  /* Define the bit, byte, and word ordering of the machine.  */
  
  #define TARGET_BYTE_ORDER	BIG_ENDIAN
Index: config/fr30/tm-fr30.h
===================================================================
RCS file: /cvs/src/src/gdb/config/fr30/tm-fr30.h,v
retrieving revision 1.5
diff -p -r1.5 tm-fr30.h
*** tm-fr30.h	2001/03/06 08:21:26	1.5
--- tm-fr30.h	2001/03/13 23:55:13
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  #define FR30_GENREGS		16
  #define FR30_DEDICATEDREGS	8
  #define FR30_REGSIZE		4	/* bytes */
Index: config/h8300/tm-h8300.h
===================================================================
RCS file: /cvs/src/src/gdb/config/h8300/tm-h8300.h,v
retrieving revision 1.5
diff -p -r1.5 tm-h8300.h
*** tm-h8300.h	2001/03/06 08:21:26	1.5
--- tm-h8300.h	2001/03/13 23:55:13
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Contributed by Steve Chamberlain sac@cygnus.com */
  
  struct frame_info;
Index: config/h8500/tm-h8500.h
===================================================================
RCS file: /cvs/src/src/gdb/config/h8500/tm-h8500.h,v
retrieving revision 1.5
diff -p -r1.5 tm-h8500.h
*** tm-h8500.h	2001/03/06 08:21:27	1.5
--- tm-h8500.h	2001/03/13 23:55:13
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Contributed by Steve Chamberlain sac@cygnus.com */
  
  #define GDB_TARGET_IS_H8500
Index: config/i386/nm-i386mach.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-i386mach.h,v
retrieving revision 1.2
diff -p -r1.2 nm-i386mach.h
*** nm-i386mach.h	2001/03/06 08:21:28	1.2
--- nm-i386mach.h	2001/03/13 23:55:13
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Do implement the attach and detach commands.  */
  /* #define ATTACH_DETACH        1 */
  
Index: config/i386/nm-ptx4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-ptx4.h,v
retrieving revision 1.3
diff -p -r1.3 nm-ptx4.h
*** nm-ptx4.h	2001/03/06 08:21:28	1.3
--- nm-ptx4.h	2001/03/13 23:55:13
***************
*** 20,25 ****
--- 20,27 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  #include "nm-sysv4.h"
  
  #undef USE_PROC_FS
Index: config/i386/nm-sun386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-sun386.h,v
retrieving revision 1.2
diff -p -r1.2 nm-sun386.h
*** nm-sun386.h	2001/03/06 08:21:28	1.2
--- nm-sun386.h	2001/03/13 23:55:13
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Do implement the attach and detach commands.  */
  
  #define ATTACH_DETACH
Index: config/i386/nm-symmetry.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-symmetry.h,v
retrieving revision 1.3
diff -p -r1.3 nm-symmetry.h
*** nm-symmetry.h	2001/03/06 08:21:28	1.3
--- nm-symmetry.h	2001/03/13 23:55:13
***************
*** 20,25 ****
--- 20,27 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
  
  #define FETCH_INFERIOR_REGISTERS
Index: config/i386/tm-i386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-i386.h,v
retrieving revision 1.11
diff -p -r1.11 tm-i386.h
*** tm-i386.h	2001/03/06 08:21:28	1.11
--- tm-i386.h	2001/03/13 23:55:13
***************
*** 22,27 ****
--- 22,29 ----
  #ifndef TM_I386_H
  #define TM_I386_H 1
  
+ #include "regcache.h"
+ 
  /* Forward declarations for prototypes.  */
  struct frame_info;
  struct frame_saved_regs;
Index: config/i386/tm-sun386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-sun386.h,v
retrieving revision 1.3
diff -p -r1.3 tm-sun386.h
*** tm-sun386.h	2001/03/06 08:21:29	1.3
--- tm-sun386.h	2001/03/13 23:55:13
***************
*** 22,27 ****
--- 22,28 ----
  #if !defined (TM_SUN386_H)
  #define TM_SUN386_H 1
  
+ #include "regcache.h"
  #include "i386/tm-i386.h"
  
  #ifndef sun386
Index: config/i386/tm-symmetry.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-symmetry.h,v
retrieving revision 1.2
diff -p -r1.2 tm-symmetry.h
*** tm-symmetry.h	2001/03/06 08:21:29	1.2
--- tm-symmetry.h	2001/03/13 23:55:13
***************
*** 24,29 ****
--- 24,31 ----
  #ifndef TM_SYMMETRY_H
  #define TM_SYMMETRY_H 1
  
+ #include "regcache.h"
+ 
  /* I don't know if this will work for cross-debugging, even if you do get
     a copy of the right include file.  */
  #include <machine/reg.h>
Index: config/m32r/tm-m32r.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m32r/tm-m32r.h,v
retrieving revision 1.3
diff -p -r1.3 tm-m32r.h
*** tm-m32r.h	2000/05/28 01:12:36	1.3
--- tm-m32r.h	2001/03/13 23:55:14
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Used by mswin.  */
  #define TARGET_M32R 1
  
Index: config/m68k/nm-sun3.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/nm-sun3.h,v
retrieving revision 1.2
diff -p -r1.2 nm-sun3.h
*** nm-sun3.h	2001/03/06 08:21:30	1.2
--- nm-sun3.h	2001/03/13 23:55:14
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Do implement the attach and detach commands.  */
  
  #define ATTACH_DETACH
Index: config/m68k/tm-delta68.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-delta68.h,v
retrieving revision 1.4
diff -p -r1.4 tm-delta68.h
*** tm-delta68.h	2000/05/28 01:12:36	1.4
--- tm-delta68.h	2001/03/13 23:55:14
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Define BPT_VECTOR if it is different than the default.
     This is the vector number used by traps to indicate a breakpoint. */
  
Index: config/m68k/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-linux.h,v
retrieving revision 1.4
diff -p -r1.4 tm-linux.h
*** tm-linux.h	2001/03/06 08:21:30	1.4
--- tm-linux.h	2001/03/13 23:55:14
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Number of traps that happen between exec'ing the shell to run an
     inferior, and when we finally get to the inferior code.  This is 2
     on most implementations.  */
Index: config/m68k/tm-news.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-news.h,v
retrieving revision 1.3
diff -p -r1.3 tm-news.h
*** tm-news.h	2001/03/06 08:21:30	1.3
--- tm-news.h	2001/03/13 23:55:14
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* See following cpu type determination macro to get the machine type.
  
     Here is an m-news.h file for gdb.  It supports the 68881 registers.
Index: config/m88k/tm-m88k.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m88k/tm-m88k.h,v
retrieving revision 1.4
diff -p -r1.4 tm-m88k.h
*** tm-m88k.h	2001/03/06 08:21:31	1.4
--- tm-m88k.h	2001/03/13 23:55:14
***************
*** 20,25 ****
--- 20,27 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* g++ support is not yet included.  */
  
  /* Define the bit, byte, and word ordering of the machine.  */
Index: config/mcore/tm-mcore.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mcore/tm-mcore.h,v
retrieving revision 1.4
diff -p -r1.4 tm-mcore.h
*** tm-mcore.h	2001/03/06 08:21:31	1.4
--- tm-mcore.h	2001/03/13 23:55:14
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA. */
  
+ #include "regcache.h"
+ 
  /* The mcore is little endian (by default) */
  #define TARGET_BYTE_ORDER_DEFAULT LITTLE_ENDIAN
  
Index: config/mips/tm-mips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
retrieving revision 1.17
diff -p -r1.17 tm-mips.h
*** tm-mips.h	2001/03/06 08:21:32	1.17
--- tm-mips.h	2001/03/13 23:55:16
***************
*** 27,32 ****
--- 27,34 ----
  
  #define GDB_MULTI_ARCH 1
  
+ #include "regcache.h"
+ 
  struct frame_info;
  struct symbol;
  struct type;
Index: config/ns32k/tm-merlin.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ns32k/tm-merlin.h,v
retrieving revision 1.3
diff -p -r1.3 tm-merlin.h
*** tm-merlin.h	2001/03/06 08:21:33	1.3
--- tm-merlin.h	2001/03/13 23:55:16
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  #define TARGET_BYTE_ORDER LITTLE_ENDIAN
  
  /* Offset from address of function to start of its code.
Index: config/ns32k/tm-umax.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ns32k/tm-umax.h,v
retrieving revision 1.4
diff -p -r1.4 tm-umax.h
*** tm-umax.h	2001/03/06 08:21:33	1.4
--- tm-umax.h	2001/03/13 23:55:16
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* This is also included by tm-ns32km3.h, as well as being used by umax.  */
  
  #define TARGET_BYTE_ORDER LITTLE_ENDIAN
Index: config/pa/nm-hppab.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppab.h,v
retrieving revision 1.2
diff -p -r1.2 nm-hppab.h
*** nm-hppab.h	2001/03/06 08:21:34	1.2
--- nm-hppab.h	2001/03/13 23:55:16
***************
*** 19,24 ****
--- 19,25 ----
     Boston, MA 02111-1307, USA.  */
  
  #include "somsolib.h"
+ #include "regcache.h"
  
  #define U_REGS_OFFSET 0
  
Index: config/pa/tm-hppa.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.6
diff -p -r1.6 tm-hppa.h
*** tm-hppa.h	2001/03/06 08:21:34	1.6
--- tm-hppa.h	2001/03/13 23:55:16
***************
*** 22,27 ****
--- 22,29 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Forward declarations of some types we use in prototypes */
  
  struct frame_info;
Index: config/pa/tm-hppao.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppao.h,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 tm-hppao.h
*** tm-hppao.h	1999/07/07 20:16:22	1.1.1.2
--- tm-hppao.h	2001/03/13 23:55:16
***************
*** 2,7 ****
--- 2,9 ----
     Contributed by the Center for Software Science at the
     University of Utah (pa-gdb-bugs@cs.utah.edu).  */
  
+ #include "regcache.h"
+ 
  /* Define offsets to access CPROC stack when it does not have
   * a kernel thread.
   */
Index: config/powerpc/nm-solaris.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/nm-solaris.h,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 nm-solaris.h
*** nm-solaris.h	1999/07/07 20:16:28	1.1.1.2
--- nm-solaris.h	2001/03/13 23:55:16
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Include the generic SVR4 definitions.  */
  
  #include <nm-sysv4.h>
Index: config/sparc/nm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/nm-nbsd.h,v
retrieving revision 1.3
diff -p -r1.3 nm-nbsd.h
*** nm-nbsd.h	2001/03/06 08:21:36	1.3
--- nm-nbsd.h	2001/03/13 23:55:16
***************
*** 22,27 ****
--- 22,29 ----
  #ifndef NM_NBSD_H
  #define NM_NBSD_H
  
+ #include "regcache.h"
+ 
  /* Get generic NetBSD native definitions. */
  
  #include "config/nm-nbsd.h"
Index: config/sparc/nm-sun4os4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/nm-sun4os4.h,v
retrieving revision 1.3
diff -p -r1.3 nm-sun4os4.h
*** nm-sun4os4.h	2001/03/06 08:21:37	1.3
--- nm-sun4os4.h	2001/03/13 23:55:16
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Do implement the attach and detach commands.  */
  
  #define ATTACH_DETACH
Index: config/sparc/nm-sun4sol2.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/nm-sun4sol2.h,v
retrieving revision 1.5
diff -p -r1.5 nm-sun4sol2.h
*** nm-sun4sol2.h	2001/03/06 08:21:37	1.5
--- nm-sun4sol2.h	2001/03/13 23:55:16
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Include the generic SVR4 definitions.  */
  
  #include <nm-sysv4.h>
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.6
diff -p -r1.6 tm-sparc.h
*** tm-sparc.h	2001/03/06 08:21:37	1.6
--- tm-sparc.h	2001/03/13 23:55:27
***************
*** 22,27 ****
--- 22,29 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  struct type;
  struct value;
  struct frame_info;
Index: config/sparc/tm-sparclet.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparclet.h,v
retrieving revision 1.4
diff -p -r1.4 tm-sparclet.h
*** tm-sparclet.h	2001/03/06 08:21:37	1.4
--- tm-sparclet.h	2001/03/13 23:55:27
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  #define TARGET_SPARCLET 1	/* Still needed for non-multi-arch case */
  
  #include "sparc/tm-sparc.h"
Index: config/sparc/tm-sparclite.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparclite.h,v
retrieving revision 1.3
diff -p -r1.3 tm-sparclite.h
*** tm-sparclite.h	2001/03/06 08:21:37	1.3
--- tm-sparclite.h	2001/03/13 23:55:28
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  #define TARGET_SPARCLITE 1	/* Still needed for non-multi-arch case */
  
  #include "sparc/tm-sparc.h"
Index: config/tic80/tm-tic80.h
===================================================================
RCS file: /cvs/src/src/gdb/config/tic80/tm-tic80.h,v
retrieving revision 1.3
diff -p -r1.3 tm-tic80.h
*** tm-tic80.h	2001/03/06 08:21:38	1.3
--- tm-tic80.h	2001/03/13 23:55:28
***************
*** 22,27 ****
--- 22,29 ----
  #ifndef TM_TIC80_H
  #define TM_TIC80_H
  
+ #include "regcache.h"
+ 
  /* Forward declare structs used in prototypes */
  struct frame_info;
  struct type;
Index: config/v850/tm-v850.h
===================================================================
RCS file: /cvs/src/src/gdb/config/v850/tm-v850.h,v
retrieving revision 1.4
diff -p -r1.4 tm-v850.h
*** tm-v850.h	2001/03/06 08:21:38	1.4
--- tm-v850.h	2001/03/13 23:55:28
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  #define TARGET_BYTE_ORDER LITTLE_ENDIAN
  
  #define NUM_REGS 66
Index: config/vax/tm-vax.h
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/tm-vax.h,v
retrieving revision 1.3
diff -p -r1.3 tm-vax.h
*** tm-vax.h	2001/03/06 08:21:39	1.3
--- tm-vax.h	2001/03/13 23:55:28
***************
*** 19,24 ****
--- 19,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
  
  #define TARGET_BYTE_ORDER LITTLE_ENDIAN
  
Index: config/w65/tm-w65.h
===================================================================
RCS file: /cvs/src/src/gdb/config/w65/tm-w65.h,v
retrieving revision 1.4
diff -p -r1.4 tm-w65.h
*** tm-w65.h	2001/03/06 08:21:39	1.4
--- tm-w65.h	2001/03/13 23:55:28
***************
*** 18,23 ****
--- 18,25 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "regcache.h"
+ 
  /* Contributed by Steve Chamberlain sac@cygnus.com */
  
  #define GDB_TARGET_IS_W65
From ac131313@cygnus.com Tue Mar 13 17:15:00 2001
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [rfc] Eliminate some __STDC__
Date: Tue, 13 Mar 2001 17:15:00 -0000
Message-id: <3AAEC541.B0A5FA50@cygnus.com>
X-SW-Source: 2001-03/msg00200.html
Content-length: 9623

Some fallout from ISO-C.

One thing should be noted.  I the patch strips a conditional ``inline''
prefix to a function.   I figure the compiler will be smart enough to
know when this should be done.

	Andrew
2001-03-13  Andrew Cagney  <ac131313@redhat.com>

	* ui-out.h: Remove #if __STDC__, assume an ISO-C compiler.
	* m3-nat.c: Ditto.
	* p-lang.h: Ditto.
	* printcmd.c (printf_command): Ditto.
	* ch-exp.c (match_integer_literal): Ditto.
	* scm-tags.h: Ditto.
	* ser-go32.c: Ditto.
	* hppa-tdep.c (unwind_command): Ditto.
	* eval.c (evaluate_subexp): Delete ``inline'' attribute.
	* defs.h (volatile): Delete macro definition.  Assume __STDC__.
	* remote-adapt.c (volatile): Ditto.
	* remote-eb.c (volatile): Ditto.
	* remote-mm.c (volatile): Ditto.
	* defs.h (alloca): Assume __STDC__, declare returning void *.

Index: ch-exp.c
===================================================================
RCS file: /cvs/src/src/gdb/ch-exp.c,v
retrieving revision 1.7
diff -p -r1.7 ch-exp.c
*** ch-exp.c	2001/03/06 08:21:06	1.7
--- ch-exp.c	2001/03/14 01:10:03
*************** match_integer_literal (void)
*** 1788,1794 ****
    else
      {
        yylval.typed_val.val = ival;
! #if defined(CC_HAS_LONG_LONG) && defined(__STDC__)
        if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
  	yylval.typed_val.type = builtin_type_long_long;
        else
--- 1788,1794 ----
    else
      {
        yylval.typed_val.val = ival;
! #if defined(CC_HAS_LONG_LONG)
        if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
  	yylval.typed_val.type = builtin_type_long_long;
        else
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.42
diff -p -r1.42 defs.h
*** defs.h	2001/03/07 16:09:03	1.42
--- defs.h	2001/03/14 01:10:03
*************** enum val_prettyprint
*** 764,786 ****
  #define CONST_PTR const
  #endif
  
- /*
-  * Allow things in gdb to be declared "volatile".  If compiling ANSI, it
-  * just works.  If compiling with gcc but non-ansi, redefine to __volatile__.
-  * If non-ansi, non-gcc, then eliminate "volatile" entirely, making those
-  * objects be read-write rather than read-only.
-  */
- 
- #ifndef volatile
- #ifndef __STDC__
- #ifdef __GNUC__
- #define volatile __volatile__
- #else
- #define volatile		/* nothing */
- #endif /* GNUC */
- #endif /* STDC */
- #endif /* volatile */
- 
  /* Defaults for system-wide constants (if not defined by xm.h, we fake it).
     FIXME: Assumes 2's complement arithmetic */
  
--- 764,769 ----
*************** extern void free ();
*** 993,1003 ****
  /* We need to be careful not to declare this in a way which conflicts with
     bison.  Bison never declares it as char *, but under various circumstances
     (like __hpux) we need to use void *.  */
- #if defined (__STDC__) || defined (__hpux)
  extern void *alloca ();
- #else /* Don't use void *.  */
- extern char *alloca ();
- #endif /* Don't use void *.  */
  #endif /* Not _AIX */
  #endif /* Not HAVE_ALLOCA_H */
  #endif /* Not GNU C */
--- 976,982 ----
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.11
diff -p -r1.11 eval.c
*** eval.c	2001/03/07 02:57:08	1.11
--- eval.c	2001/03/14 01:10:04
*************** static LONGEST
*** 61,69 ****
  init_array_element (value_ptr, value_ptr, struct expression *,
  		    int *, enum noside, LONGEST, LONGEST);
  
- #if defined (__GNUC__) && !__STDC__
- inline
- #endif
  static value_ptr
  evaluate_subexp (struct type *expect_type, register struct expression *exp,
  		 register int *pos, enum noside noside)
--- 61,66 ----
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.10
diff -p -r1.10 hppa-tdep.c
*** hppa-tdep.c	2001/03/06 08:21:08	1.10
--- hppa-tdep.c	2001/03/14 01:10:06
*************** unwind_command (char *exp, int from_tty)
*** 4524,4534 ****
    printf_unfiltered ("\n\tregion_end = ");
    print_address (u->region_end, gdb_stdout);
  
- #ifdef __STDC__
  #define pif(FLD) if (u->FLD) printf_unfiltered (" "#FLD);
- #else
- #define pif(FLD) if (u->FLD) printf_unfiltered (" FLD");
- #endif
  
    printf_unfiltered ("\n\tflags =");
    pif (Cannot_unwind);
--- 4524,4530 ----
*************** unwind_command (char *exp, int from_tty)
*** 4553,4563 ****
  
    putchar_unfiltered ('\n');
  
- #ifdef __STDC__
  #define pin(FLD) printf_unfiltered ("\t"#FLD" = 0x%x\n", u->FLD);
- #else
- #define pin(FLD) printf_unfiltered ("\tFLD = 0x%x\n", u->FLD);
- #endif
  
    pin (Region_description);
    pin (Entry_FR);
--- 4549,4555 ----
Index: m3-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m3-nat.c,v
retrieving revision 1.10
diff -p -r1.10 m3-nat.c
*** m3-nat.c	2001/03/06 08:21:09	1.10
--- m3-nat.c	2001/03/14 01:10:09
*************** mach3_read_inferior (CORE_ADDR addr, cha
*** 1832,1844 ****
    return length;
  }
  
- #ifdef __STDC__
  #define CHK_GOTO_OUT(str,ret) \
    do if (ret != KERN_SUCCESS) { errstr = #str; goto out; } while(0)
- #else
- #define CHK_GOTO_OUT(str,ret) \
-   do if (ret != KERN_SUCCESS) { errstr = str; goto out; } while(0)
- #endif
  
  struct vm_region_list
  {
--- 1832,1839 ----
*************** m3_open (char *arg, int from_tty)
*** 4225,4235 ****
  }
  
  #ifdef DUMP_SYSCALL
- #ifdef __STDC__
  #define STR(x) #x
- #else
- #define STR(x) "x"
- #endif
  
  char *bsd1_names[] =
  {
--- 4220,4226 ----
Index: p-lang.h
===================================================================
RCS file: /cvs/src/src/gdb/p-lang.h,v
retrieving revision 1.1
diff -p -r1.1 p-lang.h
*** p-lang.h	2000/06/14 12:27:59	1.1
--- p-lang.h	2001/03/14 01:10:10
***************
*** 19,27 ****
  
  /* This file is derived from c-lang.h */
  
- #ifdef __STDC__			/* Forward decls for prototypes */
  struct value;
- #endif
  
  extern int pascal_parse (void);	/* Defined in p-exp.y */
  
--- 19,25 ----
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.17
diff -p -r1.17 printcmd.c
*** printcmd.c	2001/03/06 08:21:11	1.17
--- printcmd.c	2001/03/14 01:10:12
*************** printf_command (char *arg, int from_tty)
*** 2077,2087 ****
  	      *f++ = '\\';
  	      break;
  	    case 'a':
- #ifdef __STDC__
  	      *f++ = '\a';
- #else
- 	      *f++ = '\007';	/* Bell */
- #endif
  	      break;
  	    case 'b':
  	      *f++ = '\b';
--- 2077,2083 ----
Index: remote-adapt.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-adapt.c,v
retrieving revision 1.10
diff -p -r1.10 remote-adapt.c
*** remote-adapt.c	2001/03/06 08:21:11	1.10
--- remote-adapt.c	2001/03/14 01:10:12
*************** get_hex_regs (int n, int regno)
*** 309,320 ****
  /* Called when SIGALRM signal sent due to alarm() timeout.  */
  #ifndef HAVE_TERMIO
  
- #ifndef __STDC__
- #ifndef volatile
- #define volatile
- /**/
- # endif
- #endif
  volatile int n_alarms;
  
  void
--- 309,314 ----
Index: remote-eb.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-eb.c,v
retrieving revision 1.10
diff -p -r1.10 remote-eb.c
*** remote-eb.c	2001/03/06 08:21:12	1.10
--- remote-eb.c	2001/03/14 01:10:12
*************** get_hex_regs (int n, int regno)
*** 202,211 ****
  /* Called when SIGALRM signal sent due to alarm() timeout.  */
  #ifndef HAVE_TERMIO
  
- #ifndef __STDC__
- #define volatile
- /**/
- #endif
  volatile int n_alarms;
  
  void
--- 202,207 ----
Index: remote-mm.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mm.c,v
retrieving revision 1.9
diff -p -r1.9 remote-mm.c
*** remote-mm.c	2001/03/06 08:21:12	1.9
--- remote-mm.c	2001/03/14 01:10:27
*************** FILE *mm_stream;
*** 118,129 ****
  /* Called when SIGALRM signal sent due to alarm() timeout.  */
  #ifndef HAVE_TERMIO
  
- #ifndef __STDC__
- #ifndef volatile
- #define volatile
- /**/
- # endif
- #endif
  volatile int n_alarms;
  
  static void
--- 118,123 ----
Index: scm-tags.h
===================================================================
RCS file: /cvs/src/src/gdb/scm-tags.h,v
retrieving revision 1.2
diff -p -r1.2 scm-tags.h
*** scm-tags.h	2001/03/06 08:21:16	1.2
--- scm-tags.h	2001/03/14 01:10:27
*************** extern int scm_tc16_key_vector;
*** 375,385 ****
  \f
  #endif /* 0 */
  \f
- #ifdef __STDC__
- 
- #else /* STDC */
- 
- #endif /* STDC */
- 
  
  #endif /* TAGSH */
--- 375,379 ----
Index: ser-go32.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-go32.c,v
retrieving revision 1.8
diff -p -r1.8 ser-go32.c
*** ser-go32.c	2001/02/04 07:48:18	1.8
--- ser-go32.c	2001/03/14 01:10:27
*************** dos_comisr (int irq)
*** 355,365 ****
      }
  }
  
- #ifdef __STDC__
  #define ISRNAME(x) dos_comisr##x
- #else
- #define ISRNAME(x) dos_comisr/**/x
- #endif
  #define ISR(x) static void ISRNAME(x)() {dos_comisr(x);}
  
  ISR (0) ISR (1) ISR (2) ISR (3)
--- 355,361 ----
Index: ui-out.h
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.h,v
retrieving revision 1.4
diff -p -r1.4 ui-out.h
*** ui-out.h	2001/03/06 08:21:17	1.4
--- ui-out.h	2001/03/14 01:10:28
***************
*** 25,34 ****
  
  /* The ui_out structure */
  
- #if __STDC__
  struct ui_out;
  struct ui_out_data;
- #endif
  
  
  /* the current ui_out */
--- 25,32 ----
From msnyder@cygnus.com Tue Mar 13 17:47:00 2001
From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Cc: kevinb@redhat.com
Subject: Re: [PATCH RFA] procfs.c related changes for AIX 5
Date: Tue, 13 Mar 2001 17:47:00 -0000
Message-id: <3AAEC861.2756C62A@cygnus.com>
References: <1010306025828.ZM8793@ocotillo.lan>
X-SW-Source: 2001-03/msg00201.html
Content-length: 813

Kevin Buettner wrote:
> 
> The patch below represent the changes needed to procfs.c and related files
> for making GDB work natively on AIX5/IA-64.

Kevin, 

This patch looks fine.  I just have a few requests:

* struct sigaction and struct siginfo: could you use a typedef
  instead of a define?  It will make debugging easier.

* SYSENT_PROC_NAME_FMT: there is a changelog entry without a referent.

* HAVE_SYS_SYSCALL_H, HAVE_SYS_FAULT_H: I didn't see any configury 
  changes that would define these.  Also, I think your changelog 
  entries ought to say "include conditionally", rather than just 
  "include".  These headers were already being included.

That's it, I think.  Nice piece of work!  ;-)
Oh -- your port doesn't use SYS_lwp_create etc?
Does that mean there are no threads?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA] Link remote target with svr4 solibs.
  2001-03-13 11:19       ` J.T. Conklin
  2001-03-13 16:02         ` Michael Snyder
@ 2001-04-17 13:29         ` Michael Snyder
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2001-04-17 13:29 UTC (permalink / raw)
  To: jtc; +Cc: gdb-patches, cagney, kevinb, hunt

"J.T. Conklin" wrote:
> 
> >>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
> Andrew> Assuming ok with J.T. as well, can you add it to those functions along
> Andrew> with a FIXME.  Plenty of other examples can already be found.
> 
> I was going to mention this yesterday as well.  I don't want to be
> unreasonable and make you fix the problems with the _open vector, but
> I do want the code marked so once that is fixed it can be migrated to
> the proper place.  So as long as you add a FIXME, the change is OK by
> me.
> 
>         --jtc

After a long delay, I'm finally checking in this change.  I'll append the 
change again here to save anyone interested from rooting thru the archive.
2001-04-17  Michael Snyder  <msnyder@redhat.com>
	
	* remote.c (remote_open_1): On opening the remote target, activate
	the solib_create_inferior_hook, so that it can detect when the
	target loads shared libraries.
	(remote_async_open_1): Ditto.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.44
diff -c -3 -p -r1.44 remote.c
*** remote.c	2001/04/03 01:42:17	1.44
--- remote.c	2001/04/17 20:28:51
***************
*** 50,55 ****
--- 50,57 ----
  #include <signal.h>
  #include "serial.h"
  
+ #include "gdbcore.h" /* for exec_bfd */
+ 
  /* Prototypes for local functions */
  static void cleanup_sigint_signal_handler (void *dummy);
  static void initialize_sigint_signal_handler (void);
*************** serial device is attached to the remote 
*** 2148,2158 ****
  
    if (extended_p)
      {
!       /* tell the remote that we're using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
  }
  
  /* Just like remote_open but with asynchronous support. */
--- 2150,2169 ----
  
    if (extended_p)
      {
!       /* Tell the remote that we are using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
+   /* FIXME: need a master target_open vector from which all 
+      remote_opens can be called, so that stuff like this can 
+      go there.  Failing that, the following code must be copied
+      to the open function for any remote target that wants to 
+      support svr4 shared libraries.  */
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
+   if (exec_bfd) 	/* No use without an exec file. */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* Just like remote_open but with asynchronous support. */
*************** serial device is attached to the remote 
*** 2242,2252 ****
  
    if (extended_p)
      {
!       /* tell the remote that we're using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
  }
  
  /* This takes a program previously attached to and detaches it.  After
--- 2253,2272 ----
  
    if (extended_p)
      {
!       /* Tell the remote that we are using the extended protocol.  */
        char *buf = alloca (PBUFSIZ);
        putpkt ("!");
        getpkt (buf, PBUFSIZ, 0);
      }
+   /* FIXME: need a master target_open vector from which all 
+      remote_opens can be called, so that stuff like this can 
+      go there.  Failing that, the following code must be copied
+      to the open function for any remote target that wants to 
+      support svr4 shared libraries.  */
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
+   if (exec_bfd) 	/* No use without an exec file. */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* This takes a program previously attached to and detaches it.  After
From msnyder@cygnus.com Tue Apr 17 13:30:00 2001
From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] info breakpoints: handle 64-bit addresses
Date: Tue, 17 Apr 2001 13:30:00 -0000
Message-id: <3ADCA523.D140103D@cygnus.com>
References: <3AB0235F.FB3710FD@cygnus.com>
X-SW-Source: 2001-04/msg00176.html
Content-length: 4013

Michael Snyder wrote:
> 
> I know I'm the maintainer, but I'm gonna ask for approval anyway,
> to make sure I haven't violated either portability or aesthetic standards.

Committed (with the change suggested by Ed Satterthwaite).

> 
>   ----------------------------------------------------------------------------------------------------
> 2001-03-14  Michael Snyder  <msnyder@redhat.com>
> 
>         * breakpoint.c (print_one_breakpoint): Handle 64-bit addresses.
> 
> Index: breakpoint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/breakpoint.c,v
> retrieving revision 1.27
> diff -c -3 -p -r1.27 breakpoint.c
> *** breakpoint.c        2001/03/06 08:21:05     1.27
> --- breakpoint.c        2001/03/15 02:15:37
> *************** print_one_breakpoint (struct breakpoint
> *** 3156,3162 ****
>     /* 5 and 6 */
>     strcpy (wrap_indent, "                           ");
>     if (addressprint)
> !     strcat (wrap_indent, "           ");
>     switch (b->type)
>       {
>       case bp_none:
> --- 3156,3167 ----
>     /* 5 and 6 */
>     strcpy (wrap_indent, "                           ");
>     if (addressprint)
> !     {
> !       if (TARGET_ADDR_BIT <= 32)
> !       strcat (wrap_indent, "           ");
> !       else
> !       strcat (wrap_indent, "                   ");
> !     }
>     switch (b->type)
>       {
>       case bp_none:
> *************** print_one_breakpoint (struct breakpoint
> *** 3330,3341 ****
>   #else
>         if (addressprint)
>         {
>           annotate_field (4);
> !         /* FIXME-32x64: need a print_address_numeric with
> !            field width */
> !         printf_filtered ("%s ",
> !                          local_hex_string_custom
> !                          ((unsigned long) b->address, "08l"));
>         }
>         annotate_field (5);
>         *last_addr = b->address;
> --- 3335,3350 ----
>   #else
>         if (addressprint)
>         {
> +         char *tmp;
> +
>           annotate_field (4);
> !
> !         if (TARGET_ADDR_BIT <= 32)
> !           tmp = longest_local_hex_string_custom (b->address, "08l");
> !         else
> !           tmp = longest_local_hex_string_custom (b->address, "016l");
> !
> !         printf_filtered ("%s ", tmp);
>         }
>         annotate_field (5);
>         *last_addr = b->address;
> *************** breakpoint_1 (int bnum, int allflag)
> *** 3570,3576 ****
>             if (addressprint)
>               {
>                 annotate_field (4);
> !               ui_out_table_header (uiout, 10, ui_left, "Address");    /* 5 */
>               }
>             annotate_field (5);
>             ui_out_table_header (uiout, 40, ui_noalign, "What");        /* 6 */
> --- 3579,3588 ----
>             if (addressprint)
>               {
>                 annotate_field (4);
> !               if (TARGET_ADDR_BIT <= 32)
> !                 ui_out_table_header (uiout, 10, ui_left, "Address");  /* 5 */
> !               else
> !                 ui_out_table_header (uiout, 18, ui_left, "Address");  /* 5 */
>               }
>             annotate_field (5);
>             ui_out_table_header (uiout, 40, ui_noalign, "What");        /* 6 */
> *************** breakpoint_1 (int bnum, int allflag)
> *** 3587,3593 ****
>             if (addressprint)
>               {
>                 annotate_field (4);
> !               printf_filtered ("Address    ");
>               }
>             annotate_field (5);
>             printf_filtered ("What\n");
> --- 3599,3608 ----
>             if (addressprint)
>               {
>                 annotate_field (4);
> !               if (TARGET_ADDR_BIT <= 32)
> !                 printf_filtered ("Address    ");
> !               else
> !                 printf_filtered ("Address            ");
>               }
>             annotate_field (5);
>             printf_filtered ("What\n");


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-04-17 13:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-12 16:13 [RFA] Link remote target with svr4 solibs Michael Snyder
     [not found] ` <5m1ys2cxxt.fsf@jtc.redback.com>
2001-03-12 16:38   ` Andrew Cagney
2001-03-12 16:44     ` J.T. Conklin
     [not found]   ` <3AAD6D7D.77A18268@cygnus.com>
2001-03-13  8:52     ` Andrew Cagney
2001-03-13 10:31       ` Michael Snyder
2001-03-13 11:19       ` J.T. Conklin
2001-03-13 16:02         ` Michael Snyder
2001-04-17 13:29         ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox