This is the mail archive of the 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: [PATCH] solib-svr4: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot

On Fri, 01 Jun 2012 19:37:22 +0200, Pedro Alves wrote:
> Yeah, that's a really contrived example.  You're relying on stopping at main,
> not when the DSO is really loaded (_dl_debug_state) to set the breakpoint.
> I can see _start not existing, with the entry point named something else,
> but if you strip your static binary to miss _dl_debug_state, you won't get
> main either.  (and then static binaries that dlopen aren't something you'd
> want to do normally.)

I do not have to strip the binary to not have _dl_debug_state, there are many
libc implementations out there and I guess they are not all compatible with
the "_dl_debug_state" naming.  I guess this is also the reason why GDB knows
so many names for it:

And the goal of this breakpoint is that most of programs loads
libraries only during its init, before main, therefore a breakpoint at "main"
should catch them all.

OTOH as I said current GDB will place the breakpoint to _start first and it
will miss those libraries anyway.  So it is not a regression.

Also nowadays some 3rd party runtime probably more adapts to GDB than vice


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