This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Fixes problem setting breakpoint in dynamic loader
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Thu, 14 Jun 2007 23:38:33 +0000 (UTC)
- Subject: Re: [PATCH] Fixes problem setting breakpoint in dynamic loader
- References: <firstname.lastname@example.org>
On Fri, 27 Apr 2007, Thiago Jung Bauermann wrote:
> Hi folks,
> This is a re-submission of:
This doesn't work properly for me. There seem to be at least two problems
with relying on the implicit conversion by
ppc_linux_convert_from_func_ptr_addr done when setting a breakpoint:
* ppc_linux_convert_from_func_ptr_addr relies on being able to find the
function descriptor address in a section table, but doesn't have current
information about the load address of ld.so which has only just been
determined in enable_break.
* The function descriptor in ld.so has not yet been relocated (as part of
ld.so applying relocations to itself) at the time this breakpoint is set.
So after the address is extracted from the function descriptor, the load
address of ld.so must be added to it again. (I think this provides an
answer to Andreas's question in
<http://sourceware.org/ml/gdb-patches/2006-07/msg00183.html>: the explicit
conversion is needed so that this relocation applies when load_addr gets
added to the address later before the breakpoint is set.)
I have a patch version partly based on the earlier revision
<http://sourceware.org/ml/gdb-patches/2006-07/msg00019.html> which does
set the breakpoint correctly, but I still have other GDB problems I'm
investigating with that patch applied.
Joseph S. Myers