Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Stephen & Linda Smith <ischis2@cox.net>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: Shared libraries and the solib interface
Date: Thu, 02 Oct 2003 06:26:00 -0000	[thread overview]
Message-ID: <3F7BC5AD.9020706@cox.net> (raw)
In-Reply-To: <1031002054312.ZM15015@localhost.localdomain>

Kevin Buettner wrote:

>This approach can be used even if the dynamic linker doesn't provide a
>convenient function (or even an inconvenient function) to set a
>breakpoint on.  In such a case, the stub is presumably informed via
>other means of the fact that a shared library has just been loaded. 
>The stub could stop and tell GDB that it's just hit a fake "shared
>library loaded" breakpoint.  Your solib backend (on the GDB side) and
>the stub would have to agree on some suitable address to use for this
>purpose.  There is some risk associated with lying to GDB in such a
>manner, but this risk is mitigated by the fact that users don't
>usually stop at these internal breakpoints.  [Setting
>``stop-on-solib-events'' does allow the user to stop though.  Once you get
>the basic machinery going, you'll want to remember to test with this
>setting to make sure it's not too badly broken.  It can, at times, be
>extremely useful to allow a user-level stop when a solib related
>breakpoint has been hit.]
>  
>

Do you know of an example of this?  And a second question is how does a 
generic stub inform the GDB (workstation side) app which shared library 
got loaded and where or is this not necessary?

>There are other approaches that could be used, but most of these would
>involve adding code to other (generic) portions of gdb.  Since it's
>more difficult to get approval for changes to generic code, it's probably
>best to stick with mechanisms which are already in use by other targets.
>  
>

Yeah, that's where I crashed and burned last time.

>HTH,
>
>Kevin
>
>
>  
>


  reply	other threads:[~2003-10-02  6:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02  4:08 Stephen & Linda Smith
2003-10-02  5:43 ` Kevin Buettner
2003-10-02  6:26   ` Stephen & Linda Smith [this message]
2003-10-02 19:15     ` Kevin Buettner
2003-10-02 20:50       ` Stephen P. Smith
2003-10-02 23:18         ` Kevin Buettner
2003-10-08 15:44 ` Andrew Cagney
     [not found] <1065665939.20950.ezmlm@sources.redhat.com>
2003-10-09 14:01 ` John S. Yates, Jr.

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=3F7BC5AD.9020706@cox.net \
    --to=ischis2@cox.net \
    --cc=gdb@sources.redhat.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