aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@codesourcery.com>2005-11-16 22:10:39 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2005-11-16 22:10:39 +0000
commit60aef23e3893b32703adcfbd49037b72ca6b21f2 (patch)
treeeee487b7c8a5cd39e5ffc9431300e3caa8c8935e
parent0e32bbcc674601f8a59109568a548692bbfa9e24 (diff)
downloadgcc-60aef23e3893b32703adcfbd49037b72ca6b21f2.zip
gcc-60aef23e3893b32703adcfbd49037b72ca6b21f2.tar.gz
gcc-60aef23e3893b32703adcfbd49037b72ca6b21f2.tar.bz2
unwind-ia64.c (uw_advance_context): New.
* config/ia64/unwind-ia64.c (uw_advance_context): New. Call uw_update_context. * unwind-dw2.c (uw_advance_context): Likewise. * unwind-sjlj.c (uw_advance_context): Likewise. Also call _Unwind_SjLj_Unregister. * unwind.inc (_Unwind_ForcedUnwind_Phase2): Call uw_advance_context. From-SVN: r107103
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/ia64/unwind-ia64.c6
-rw-r--r--gcc/unwind-dw2.c6
-rw-r--r--gcc/unwind-sjlj.c7
-rw-r--r--gcc/unwind.inc5
5 files changed, 31 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f35e98..d0ef8fc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+ * config/ia64/unwind-ia64.c (uw_advance_context): New. Call
+ uw_update_context.
+ * unwind-dw2.c (uw_advance_context): Likewise.
+ * unwind-sjlj.c (uw_advance_context): Likewise. Also call
+ _Unwind_SjLj_Unregister.
+ * unwind.inc (_Unwind_ForcedUnwind_Phase2): Call uw_advance_context.
+
+2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+
* unwind-sjlj.c (_Unwind_GetCFA): Handle the builtin_setjmp case.
2005-11-16 Eric Botcazou <ebotcazou@adacore.com>
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index 7608507..c1be313 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -2060,6 +2060,12 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
}
}
+static void
+uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
+{
+ uw_update_context (context, fs);
+}
+
/* Fill in CONTEXT for top-of-stack. The only valid registers at this
level will be the return address and the CFA. Note that CFA = SP+16. */
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 5a4375f..4626ec6 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -1210,6 +1210,12 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
context->ra = __builtin_extract_return_addr
(_Unwind_GetPtr (context, fs->retaddr_column));
}
+
+static void
+uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
+{
+ uw_update_context (context, fs);
+}
/* Fill in CONTEXT for top-of-stack. The only valid registers at this
level will be the return address and the CFA. */
diff --git a/gcc/unwind-sjlj.c b/gcc/unwind-sjlj.c
index 9ea6d06..4c06aa1 100644
--- a/gcc/unwind-sjlj.c
+++ b/gcc/unwind-sjlj.c
@@ -276,6 +276,13 @@ uw_update_context (struct _Unwind_Context *context,
context->fc = context->fc->prev;
}
+static void
+uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
+{
+ _Unwind_SjLj_Unregister (context->fc);
+ uw_update_context (context, fs);
+}
+
static inline void
uw_init_context (struct _Unwind_Context *context)
{
diff --git a/gcc/unwind.inc b/gcc/unwind.inc
index 63fba96..b533eb5 100644
--- a/gcc/unwind.inc
+++ b/gcc/unwind.inc
@@ -184,8 +184,9 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
return _URC_FATAL_PHASE2_ERROR;
}
- /* Update cur_context to describe the same frame as fs. */
- uw_update_context (context, &fs);
+ /* Update cur_context to describe the same frame as fs, and discard
+ the previous context if necessary. */
+ uw_advance_context (context, &fs);
}
return code;