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