[patch/rfc] Deprecate FUNCTION_START_OFFSET
Fri Jun 18 21:37:00 GMT 2004
> Ref: http://sources.redhat.com/ml/gdb-patches/2004-05/msg00098.html
>> 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''.
>> (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,
(and a day) The attached is the final commit - I missed a few deprecates :-(
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gdb-patches