]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/gcc/gcc44-unwind-debug-hook.patch
core91: Add changed pppsetup.cgi and language files
[ipfire-2.x.git] / src / patches / gcc / gcc44-unwind-debug-hook.patch
CommitLineData
ed635824
MT
12010-04-27 Jakub Jelinek <jakub@redhat.com>
2
3 * unwind-dw2.c (_Unwind_DebugHook): Add used attribute.
4
52009-05-27 Tom Tromey <tromey@redhat.com>
6
7 * unwind-dw2.c (_Unwind_DebugHook): New function.
8 (uw_install_context): Call _Unwind_DebugHook.
9
10--- gcc/unwind-dw2.c (revision 147933)
11+++ gcc/unwind-dw2.c (revision 147934)
12@@ -1473,18 +1473,32 @@ uw_init_context_1 (struct _Unwind_Contex
13 context->ra = __builtin_extract_return_addr (outer_ra);
14 }
15
16+static void _Unwind_DebugHook (void *, void *)
17+ __attribute__ ((__noinline__, __used__));
18+
19+/* This function is called during unwinding. It is intended as a hook
20+ for a debugger to intercept exceptions. CFA is the CFA of the
21+ target frame. HANDLER is the PC to which control will be
22+ transferred. */
23+static void
24+_Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
25+ void *handler __attribute__ ((__unused__)))
26+{
27+ asm ("");
28+}
29
30 /* Install TARGET into CURRENT so that we can return to it. This is a
31 macro because __builtin_eh_return must be invoked in the context of
32 our caller. */
33
34-#define uw_install_context(CURRENT, TARGET) \
35- do \
36- { \
37- long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
38- void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
39- __builtin_eh_return (offset, handler); \
40- } \
41+#define uw_install_context(CURRENT, TARGET) \
42+ do \
43+ { \
44+ long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
45+ void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
46+ _Unwind_DebugHook ((TARGET)->cfa, handler); \
47+ __builtin_eh_return (offset, handler); \
48+ } \
49 while (0)
50
51 static long