This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfa] Allow breakpoing to be added after inferior has started
- From: Daniel Jacobowitz <drow at false dot org>
- To: Randolph Chung <randolph at tausq dot org>
- Cc: gdb-patches at sources dot redhat dot com, Andrew Cagney <cagney at gnu dot org>
- Date: Mon, 7 Jun 2004 11:20:38 -0400
- Subject: Re: [patch/rfa] Allow breakpoing to be added after inferior has started
- References: <20040522023133.GG7207@tausq.org> <40B38DC8.30601@gnu.org> <20040525183043.GH7207@tausq.org> <20040607030413.GD601@tausq.org> <20040522023133.GG7207@tausq.org>
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