This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fixes problem setting breakpoint in dynamic loader

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 which has only just been 
determined in enable_break.

* The function descriptor in has not yet been relocated (as part of 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 must be added to it again.  (I think this provides an 
answer to Andreas's question in 
<>: 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 
<> which does 
set the breakpoint correctly, but I still have other GDB problems I'm 
investigating with that patch applied.

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]