[patch/rfc] Deprecate FUNCTION_START_OFFSET

Andrew Cagney cagney@gnu.org
Thu Jun 10 15:38:00 GMT 2004


Hello,

Ref: http://sources.redhat.com/ml/gdb-patches/2004-05/msg00098.html
> Hello,
> 
> Looking over the Randolph's PA descriptor problem drew my attention to FUNCTION_START_OFFSET. The VAX uses this to ``adjust'' a function pointer so that it instead points to the function's code address (the first few bytes of a vax function are not executible and need to be skipped over).
> 
> Thing is, this conversion is exactly what CONVERT_FUNC_PTR_ADDR is for. Given a function pointer return the function's code address. Given this overlap, I think FUNCTION_START_OFFSET should be deprecated - it is redundant.
> 
> The only got-ya is with GDB's lack of dicipline when it comes to correctly differentiating between function pointers and code addresses. This is clearly illustrated by the current 64-bit GNU/Linux PPC code: for that OSABI, instead of having function pointers address the function's descriptor, GDB has function pointers addressing the function's code address - definitly wrong(1). Eliminating FUNCTION_START_OFFSET will result in other code being ``fixed''.
> 
> comments,
> Andrew
> 
> 
> (1) This is why function parameters don't work for that OSABI - GDB passes the incorrect value to push dummy call.

The attached deprecates FUNCTION_START_OFFSET.

I'll look to commit in a week,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040610/70445e80/attachment.ksh>


More information about the Gdb-patches mailing list