This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] _Unwind_DebugHook fix
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Tom Tromey <tromey at redhat dot com>, Jan Kratochvil <jkratoch at redhat dot com>
- Date: Tue, 27 Apr 2010 10:27:04 +0200
- Subject: [PATCH] _Unwind_DebugHook fix
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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.
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