Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: Stephen & Linda Smith <ischis2@cox.net>, gdb@sources.redhat.com
Subject: Re: shared library support hookin the remote.c
Date: Fri, 02 Jul 2004 21:25:00 -0000	[thread overview]
Message-ID: <20040702142522.038721dd@saguaro> (raw)
In-Reply-To: <40E5C383.7060506@gnu.org>

On Fri, 02 Jul 2004 16:20:19 -0400
Andrew Cagney <cagney@gnu.org> wrote:

> Kevin, how does/should the existing remote GNU/Linux target work?
> If we ignore the #ifdef SOLIB* code used during the initial attach, what 
> components interact to maintain the shlibs?

The existing GNU/Linux target knows just enough about the dynamic linker
(struct layout and symbol names) to be able to use memory reads to do the
entire thing.  I.e, all the information that GDB needs is either obtained
from the symbol table or from the address space of the target.

I am comfortable with this arrangement for GNU/Linux, but it isn't
adequate for all shared library scenarios.  E.g, I've worked on shared
library mechanisms in the past which used files from /proc to specify
the mappings.  It would be good if we could come up with a protocol
extension whereby the target supplies the information that GDB
needs.

I think we need the following:

1) A way to be notified when the shared library mappings have changed
2) A way to fetch the new mappings.  I think the following should
   be sufficient:
    a) The unrelocated starting address of a segment.
    b) The length of the segment
    c) The address (relocated) of the segment.
    d) The address space associated with the segment (think harvard
       architecture here).
    e) A way of iterating over the various segments.

solib-svr4.c does (1) by using breakpoints; i.e. a breakpoint is set
on a dynamic linker function which is always called when the mappings
change.  It does all of (2) by reading target memory.

Kevin


  parent reply	other threads:[~2004-07-02 21:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 21:05 shared library support Stephen P. Smith
2004-05-21 20:49 ` Stephen P. Smith
2004-06-11 21:14   ` Kevin Buettner
2004-06-24  1:55     ` shared library support hookin the remote.c Stephen & Linda Smith
2004-06-28 21:44       ` Kevin Buettner
2004-06-28 21:45         ` Stephen P. Smith
2004-06-29  1:55           ` Kevin Buettner
2004-06-29  1:56             ` Stephen & Linda Smith
2004-07-01 17:58               ` Kevin Buettner
2004-07-02 20:20                 ` Andrew Cagney
2004-07-02 21:16                   ` Stephen P. Smith
2004-07-02 22:30                     ` Andrew Cagney
2004-07-13 20:15                       ` Stephen P. Smith
2004-07-14 18:30                         ` Andrew Cagney
2004-07-14 18:44                           ` Stephen & Linda Smith
2004-07-14 19:05                             ` Dave Korn
2004-07-14 19:29                             ` Andrew Cagney
2004-07-02 21:25                   ` Kevin Buettner [this message]
2004-07-02 22:25                     ` Andrew Cagney
2004-07-02 23:22                       ` Kevin Buettner
2004-07-08 15:04                         ` Andrew Cagney
2004-07-28  3:04                           ` Kevin Buettner
2004-08-03 14:58                             ` Andrew Cagney
2004-06-29  2:13 Stephen & Linda Smith
2004-06-29  6:27 ` Stephen & Linda Smith

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=20040702142522.038721dd@saguaro \
    --to=kevinb@redhat.com \
    --cc=cagney@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=ischis2@cox.net \
    /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