This is the mail archive of the
mailing list for the GCC project.
Re: RFA: add debug hook to unwinder
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: tromey at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Jun 2009 17:38:34 +0200
- Subject: Re: RFA: add debug hook to unwinder
- References: <email@example.com> <firstname.lastname@example.org> <4A31E890.email@example.com>
On Fri, Jun 12, 2009 at 7:33 AM, Richard Henderson<firstname.lastname@example.org> 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
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 ...