* gdb doesn't work well with DSO on Linux/mips
@ 2002-03-22 23:47 H . J . Lu
2002-03-23 0:08 ` H . J . Lu
0 siblings, 1 reply; 6+ messages in thread
From: H . J . Lu @ 2002-03-22 23:47 UTC (permalink / raw)
To: GDB
# 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?
H.J.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb doesn't work well with DSO on Linux/mips
2002-03-22 23:47 gdb doesn't work well with DSO on Linux/mips H . J . Lu
@ 2002-03-23 0:08 ` H . J . Lu
2002-03-23 8:52 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: H . J . Lu @ 2002-03-23 0:08 UTC (permalink / raw)
To: GDB
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.
--- gdb/config/mips/tm-linux.h.dso Wed Mar 6 22:31:53 2002
+++ gdb/config/mips/tm-linux.h Fri Mar 22 23:53:42 2002
@@ -49,6 +49,9 @@ extern struct link_map_offsets *mips_lin
#define SVR4_FETCH_LINK_MAP_OFFSETS() \
mips_linux_svr4_fetch_link_map_offsets ()
+#undef SOLIB_BKPT_NAME
+#define SOLIB_BKPT_NAME "__start"
+
/* Details about jmp_buf. */
#define JB_ELEMENT_SIZE 4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb doesn't work well with DSO on Linux/mips
2002-03-23 0:08 ` H . J . Lu
@ 2002-03-23 8:52 ` Daniel Jacobowitz
2002-03-23 11:39 ` Andrew Cagney
2002-03-25 20:06 ` Kevin Buettner
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-03-23 8:52 UTC (permalink / raw)
To: H . J . Lu; +Cc: GDB, Kevin Buettner
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb doesn't work well with DSO on Linux/mips
2002-03-23 8:52 ` Daniel Jacobowitz
@ 2002-03-23 11:39 ` Andrew Cagney
2002-03-25 20:06 ` Kevin Buettner
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2002-03-23 11:39 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: H . J . Lu, GDB, Kevin Buettner
> 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?
Well, adding the macro is wrong :-)
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb doesn't work well with DSO on Linux/mips
2002-03-23 8:52 ` Daniel Jacobowitz
2002-03-23 11:39 ` Andrew Cagney
@ 2002-03-25 20:06 ` Kevin Buettner
2002-03-25 20:32 ` Daniel Jacobowitz
1 sibling, 1 reply; 6+ messages in thread
From: Kevin Buettner @ 2002-03-25 20:06 UTC (permalink / raw)
To: Daniel Jacobowitz, H . J . Lu; +Cc: GDB, Kevin Buettner
On Mar 23, 11:52am, Daniel Jacobowitz wrote:
> > 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.
Yes, I prefer this as well.
> 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?
Wouldn't this cause problems when debugging ordinary statically linked
programs? After all, we'd be putting solib event creation breakpoints
on symbols like main and _start.
Or were you referring to symbols like r_debug_state, etc? If that's
the case, I think it'd be okay.
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb doesn't work well with DSO on Linux/mips
2002-03-25 20:06 ` Kevin Buettner
@ 2002-03-25 20:32 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-03-25 20:32 UTC (permalink / raw)
To: Kevin Buettner; +Cc: H . J . Lu, GDB
On Mon, Mar 25, 2002 at 09:05:49PM -0700, Kevin Buettner wrote:
> On Mar 23, 11:52am, Daniel Jacobowitz wrote:
>
> > > 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.
>
> Yes, I prefer this as well.
>
> > 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?
>
> Wouldn't this cause problems when debugging ordinary statically linked
> programs? After all, we'd be putting solib event creation breakpoints
> on symbols like main and _start.
We'll already do this, I think.
> Or were you referring to symbols like r_debug_state, etc? If that's
> the case, I think it'd be okay.
Yes, that's what I meant. I was thinking of _dl_debug_state, which I
believe is the glibc equivalent of r_debug_state.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-03-26 4:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-22 23:47 gdb doesn't work well with DSO on Linux/mips H . J . Lu
2002-03-23 0:08 ` H . J . Lu
2002-03-23 8:52 ` Daniel Jacobowitz
2002-03-23 11:39 ` Andrew Cagney
2002-03-25 20:06 ` Kevin Buettner
2002-03-25 20:32 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox