aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-05-27 23:12:21 +0000
committerTom Tromey <tromey@gcc.gnu.org>2009-05-27 23:12:21 +0000
commite455776af007aadd80be631e2dd7be60e33dad88 (patch)
treeb1e619202a5c9ef24a5dd472f74194ce7272723a /gcc
parentc5adc4275c2a4e0f6529b9985da0bdb043af151e (diff)
downloadgcc-e455776af007aadd80be631e2dd7be60e33dad88.zip
gcc-e455776af007aadd80be631e2dd7be60e33dad88.tar.gz
gcc-e455776af007aadd80be631e2dd7be60e33dad88.tar.bz2
unwind-dw2.c (_Unwind_DebugHook): New function.
* unwind-dw2.c (_Unwind_DebugHook): New function. (uw_install_context): Call _Unwind_DebugHook. From-SVN: r147934
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/unwind-dw2.c27
2 files changed, 25 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 306b3f8..6920b5a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2009-05-27 Tom Tromey <tromey@redhat.com>
+ * unwind-dw2.c (_Unwind_DebugHook): New function.
+ (uw_install_context): Call _Unwind_DebugHook.
+
+2009-05-27 Tom Tromey <tromey@redhat.com>
+
* system.h (CONST_CAST2): Use C++ const_cast when compiled as C++
2009-05-27 Ian Lance Taylor <iant@google.com>
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index dd3dd54..68a1a28 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -1473,18 +1473,31 @@ uw_init_context_1 (struct _Unwind_Context *context,
context->ra = __builtin_extract_return_addr (outer_ra);
}
+static void _Unwind_DebugHook (void *, void *) __attribute__ ((__noinline__));
+
+/* 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 ("");
+}
/* Install TARGET into CURRENT so that we can return to it. This is a
macro because __builtin_eh_return must be invoked in the context of
our caller. */
-#define uw_install_context(CURRENT, TARGET) \
- do \
- { \
- long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
- void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
- __builtin_eh_return (offset, handler); \
- } \
+#define uw_install_context(CURRENT, TARGET) \
+ do \
+ { \
+ long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
+ void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
+ _Unwind_DebugHook ((TARGET)->cfa, handler); \
+ __builtin_eh_return (offset, handler); \
+ } \
while (0)
static long