Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfc] Shared libraries in static programs
Date: Thu, 12 Apr 2007 23:03:00 -0000	[thread overview]
Message-ID: <20070412160333.07d543a4@ironwood.lan> (raw)
In-Reply-To: <20070412221025.GA2848@caradoc.them.org>

On Thu, 12 Apr 2007 18:10:25 -0400
Daniel Jacobowitz <drow@false.org> wrote:

> Glibc has a complicated mechanism where a static executable may
> include a chunk of libdl, for dlopen.  If this gets used, then it
> initializes _r_debug just like normal.
> 
> There are three differences:
>   - There's no .dynamic, so we can't use DT_DEBUG.
>   - We shouldn't skip the first thing on the list, because the
>     executable is not dynamic and therefore is not on the list.
>   - _dl_debug_state might be in exec_bfd, so we should set a
>     breakpoint there if we can.
> 
> This patch, lightly tested, lets me get at the shared library I was
> trying to debug.  Does it look OK?

It looks reasonable to me.  Feel free to commit it.

Thanks,

Kevin


  reply	other threads:[~2007-04-12 23:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 22:10 Daniel Jacobowitz
2007-04-12 23:03 ` Kevin Buettner [this message]
2007-04-13 13:54   ` Daniel Jacobowitz
2007-04-13 13:57     ` Daniel Jacobowitz

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=20070412160333.07d543a4@ironwood.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.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