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: hacking shlib/dlopened breakpoints


On Fri, Nov 21, 2003 at 11:15:21AM -0800, H. J. Lu wrote:
> On Fri, Nov 21, 2003 at 12:55:02PM +0000, Caolan McNamara wrote:
> > I'm looking at breakpoints in dlopened libraries at the moment,
> > setting a breakpoint after my library is dlopened works of course
> > and, as in the example below, I see that gdb can move the address of
> > the breakpoint in the .so when it is unloaded and reloaded during
> > execution, but on re-execution of the little program I get
> > "
> > Warning:
> > Cannot insert breakpoint X.
> > Error accessing memory address 0xe8535a: Input/output error.
> > "
> > 
> > Naturally the library isn't loaded at the start of re-execution, but I
> > hoped that the the breakpoint state would change to bp_shlib_disabled
> > and get reenabled when the .so reappears.
> > 
> 
> Is there a way to tell gdb to stop right after the symbols of a
> dlopened DSO is loaded?

set stop-on-solib-events 1

There's a documented catch load command, but it only works on HP/UX. 
Fixing it for SysV shared libraries is somewhere down my list of things
to do.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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