This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] _Unwind_DebugHook fix
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Tom Tromey <tromey at redhat dot com>, Jan Kratochvil <jkratoch at redhat dot com>
- Date: Tue, 27 Apr 2010 11:19:40 +0200
- Subject: Re: [PATCH] _Unwind_DebugHook fix
- References: <20100427082704.GV2817@tyan-ft48-01.lab.bos.redhat.com>
On Tue, Apr 27, 2010 at 10:27 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> GCC 4.5/4.6 currently passes no arguments to _Unwind_DebugHook, as they
> aren't referenced in the function. ?Even before IPA opts removed the
> arguments GCC would e.g. make it silently a regparm calling convention on
> i?86.
>
> The following patch makes sure the arguments are passed and are passed using
> the standard calling convention.
Ok.
Thanks,
Richard.
> 2010-04-27 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?* unwind-dw2.c (_Unwind_DebugHook): Add used and noclone attributes.
>
> --- gcc/unwind-dw2.c.jj 2010-04-27 08:47:18.000000000 +0200
> +++ gcc/unwind-dw2.c ? ?2010-04-27 09:10:34.000000000 +0200
> @@ -1482,7 +1482,8 @@ uw_init_context_1 (struct _Unwind_Contex
> ? context->ra = __builtin_extract_return_addr (outer_ra);
> ?}
>
> -static void _Unwind_DebugHook (void *, void *) __attribute__ ((__noinline__));
> +static void _Unwind_DebugHook (void *, void *)
> + ?__attribute__ ((__noinline__, __used__, __noclone__));
>
> ?/* This function is called during unwinding. ?It is intended as a hook
> ? ?for a debugger to intercept exceptions. ?CFA is the CFA of the
>
> ? ? ? ?Jakub
>