[rfc] Simplify ppc64_sysv_abi_adjust_breakpoint_address

Luis Machado luisgpm@linux.vnet.ibm.com
Tue Oct 7 16:31:00 GMT 2008


Hi folks,

Resurrecting this one...

It seems we have a situation in which
"ppc64_sysv_abi_adjust_breakpoint_address" is still required, in a way.

Before removing this function, GDB was smart enough to know that the
entry point of a 64-bit PPC binary is, in reality, a function
descriptor, thus grabbing the correct breakpoint location from within
that address and setting it correctly.

After removing this function, GDB no longer knows that a specific
address is a function descriptor, and places a breakpoint at a data
section. The binary's code tries to fetch the correct address from the
function descriptor's address and ends up fetching the breakpoint
instruction, which makes no sense.

So, i see two ways:

1 - Make GDB smart again, being able to determine if the address is of a
function descriptor or not, basically the way i was before this patch.

2 - Assume the user knows what he's doing and that he knows where to
place a breakpoint when using the address of a function descriptor.

Regards,
Luis

On Fri, 2008-05-16 at 14:53 +0200, Ulrich Weigand wrote:
> Daniel Jacobowitz wrote:
> > On Thu, May 15, 2008 at 01:02:00AM +0200, Ulrich Weigand wrote:
> > > Thus I'd propose to remove that code.  Any objections?
> > 
> > Hooray!  I like this.
> 
> Checked in as well.
> 
> Thanks,
> Ulrich
> 



More information about the Gdb-patches mailing list