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


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 ...

Richard.


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