From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Cc: cagney@redhat.com, kevinb@redhat.com, hunt@redhat.com,
jsmith@redhat.com, jtc@redback.com
Subject: [RFA] Link remote target with svr4 solibs.
Date: Mon, 12 Mar 2001 16:13:00 -0000 [thread overview]
Message-ID: <3AAD635C.DAE5D340@cygnus.com> (raw)
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
next reply other threads:[~2001-03-12 16:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-12 16:13 Michael Snyder [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AAD635C.DAE5D340@cygnus.com \
--to=msnyder@cygnus.com \
--cc=cagney@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=hunt@redhat.com \
--cc=jsmith@redhat.com \
--cc=jtc@redback.com \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox