gdb doesn't work well with DSO on Linux/mips

Daniel Jacobowitz drow@mvista.com
Sat Mar 23 08:52:00 GMT 2002


On Sat, Mar 23, 2002 at 12:08:03AM -0800, H . J . Lu wrote:
> On Fri, Mar 22, 2002 at 11:46:48PM -0800, H . J . Lu wrote:
> > # gdb /lib/ld-2.2.4.so
> > (gdb) b _dl_start
> > Breakpoint 1 at 0xfe4: file rtld.c, line 181.
> > (gdb) r
> > Starting program: /lib/ld-2.2.4.so 
> > Breakpoint 1 at 0x55550fe4: file rtld.c, line 181.
> > warning: shared library handler failed to enable breakpoint
> > 
> > The problem is the entry point for SVR4/MIPS is __start. But bkpt_names
> > in solib-svr4.c only checks _start. Should I add __start to bkpt_names
> > or define SOLIB_BKPT_NAME to __start for Linux/MIPS?
> > 
> > 
> 
> This seems to work for me.
> 
> 
> H.J.
> ---
> 2002-03-22  H.J. Lu  (hjl@gnu.org)
> 
> 	* config/mips/tm-linux.h (SOLIB_BKPT_NAME): New.

Actually, I'd prefer the former (add __start to bkpt_names, after
_start).  One less thing to worry about when multi-arching.

Also, it may be that we should check for the dynamic linker breakpoint
symbols in the currently loaded BFD, if there is no .interp section. 
That would explicitly improve debugging of the dynamic linker.  Kevin,
does that sound reasonable?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb mailing list