This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about _dl_debug_state and new glibc


On Mon, Oct 11, 2004 at 10:46:47AM -0700, Kevin Buettner wrote:
> On Mon, 11 Oct 2004 10:22:07 -0700
> Randolph Chung <randolph@tausq.org> wrote:
> 
> > I've been away from gdb for a bit, so hopefully this is not something
> > simple I missed while I've been away :)
> > 
> > It appears that newer versions of glibc now marks the _dl_debug_state
> > function as hidden, making it not visible to gdb. This breaks the
> > solib tracking code in solib-svr4.c.....
> > 
> > Looking at the docs, it looks like the "proper" way for gdb to do this
> > is to look up the r_debug symbol and use the r_brk member to locate 
> > _dl_debug_state's address. is there any particular reason why we don't
> > do this in gdb?

Only for static executables usually; for dynamic executables it's
supposed to be DT_DEBUG if that's available.  Same difference.

> I can't think of any reason.  I'm guessing that it was more expedient
> for the original authors of the code to do it the way it was done.
> In any case, I know of no reason not to change it so that it's done
> "properly".

We set the breakpoint on _dl_debug_state before starting the inferior.
_dl_debug_initialize initializes _r_debug somewhat later...  I'm not
sure how it is supposed to be used.  Do either of you know?

I see it hasn't been exported since March.  Blech.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]