Commit 60aef23e by Daniel Jacobowitz Committed by Daniel Jacobowitz

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
parent 0e32bbcc
2005-11-16 Daniel Jacobowitz <dan@codesourcery.com> 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. * unwind-sjlj.c (_Unwind_GetCFA): Handle the builtin_setjmp case.
2005-11-16 Eric Botcazou <ebotcazou@adacore.com> 2005-11-16 Eric Botcazou <ebotcazou@adacore.com>
......
...@@ -2060,6 +2060,12 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs) ...@@ -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 /* 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. */ level will be the return address and the CFA. Note that CFA = SP+16. */
......
...@@ -1210,6 +1210,12 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs) ...@@ -1210,6 +1210,12 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
context->ra = __builtin_extract_return_addr context->ra = __builtin_extract_return_addr
(_Unwind_GetPtr (context, fs->retaddr_column)); (_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 /* Fill in CONTEXT for top-of-stack. The only valid registers at this
level will be the return address and the CFA. */ level will be the return address and the CFA. */
......
...@@ -276,6 +276,13 @@ uw_update_context (struct _Unwind_Context *context, ...@@ -276,6 +276,13 @@ uw_update_context (struct _Unwind_Context *context,
context->fc = context->fc->prev; 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 static inline void
uw_init_context (struct _Unwind_Context *context) uw_init_context (struct _Unwind_Context *context)
{ {
......
...@@ -184,8 +184,9 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc, ...@@ -184,8 +184,9 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
return _URC_FATAL_PHASE2_ERROR; return _URC_FATAL_PHASE2_ERROR;
} }
/* Update cur_context to describe the same frame as fs. */ /* Update cur_context to describe the same frame as fs, and discard
uw_update_context (context, &fs); the previous context if necessary. */
uw_advance_context (context, &fs);
} }
return code; return code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment