This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: RFA: add debug hook to unwinder


Richard Guenther <richard.guenther@gmail.com> writes:

> On Fri, Jun 12, 2009 at 7:33 AM, Richard Henderson<rth@redhat.com> wrote:
>> Tom Tromey wrote:
>>>
>>> +/* This function is called during unwinding. ÂIt is intended as a hook
>>> + Â for a debugger to intercept exceptions. ÂCFA is the CFA of the
>>> + Â target frame. ÂHANDLER is the PC to which control will be
>>> + Â transferred. Â*/
>>> +static void
>>> +_Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
>>> + Â Â Â Â Â Â Â Â Âvoid *handler __attribute__ ((__unused__)))
>>> +{
>>> + Âasm ("");
>>> +}
>>
>> I think you should mark this function noinline for safety.
>> Otherwise some future version of the compiler could decide
>> to inline this and eliminate the _Unwind_DebugHook symbol
>> entirely.
>
> Hm, and if it is static then the compiler may as well change its calling
> ABI (like for example IPA-SRA might remove the two unused params).
> No idea how to prevent that while still having it being static though ...

Does it matter?  The compiler should not change the calling convention
if that convention is not represented correctly in the debug info.  If
it is represented correctly in the debug info, gdb should be able to
find the arguments.

Ian


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