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

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