[patch/rfa] Allow breakpoing to be added after inferior has started
Daniel Jacobowitz
drow@false.org
Mon Jun 7 15:20:00 GMT 2004
On Fri, May 21, 2004 at 07:31:33PM -0700, Randolph Chung wrote:
> The shlib-call.exp test fails on hppa (also ia64) because it tries to
> add a breakpoint before the inferior is started, so there's no where
> to put the breakpoint. gdb can handle this case if we allow pending
> breakpoints in the test.
>
> this only works on x86 and some other architectures because they put
> instructions into the plt; but some architectures put addresses in the
> plt.
This is a naming issue only. Some architectures call the table of
addresses the PLT and have another fancy name for the stubs; other
architectures put the table of addresses in .got.plt in the GOT, and
call the stubs "PLT entries". Your import stub serves the same purpose
as a PLT entry "normally" would.
This is why I was so confused by your explanation - PLT slots are
"normally" code :)
The difference on HPPA is that the undefined symbol for printf has a
value of 0 instead of a value pointing at the beginning of the import
stub. Some other architectures do this also. It's a generally
legitimate thing to do; if we worked really hard at it, we could
reconstruct the address of the import stub by grubbing around in the
text section, symbols, and relocations, but it would be quite
complicated.
>
> ok to commit?
>
> randolph
>
> 2004-05-21 Randolph Chung <tausq@debian.org>
>
> * gdb.base/shlib-call.exp: Allow breakpoint to be added after inferior
> has started.
OK.
--
Daniel Jacobowitz
More information about the Gdb-patches
mailing list