From 79d0dfa314d6b7d1db89735809d7f7f19b5efd86 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 17 May 2005 15:37:47 +0000 Subject: unwind-dw2-fde-glibc.c (base_from_cb_data, [...]): Use gcc_assert and gcc_unreachable as appropriate. * unwind-dw2-fde-glibc.c (base_from_cb_data, _Unwind_IteratePhdrCallback): Use gcc_assert and gcc_unreachable as appropriate. * unwind-dw2-fde.c (__deregister_frame_info_bases, base_from_object, fde_split, end_fde_sort): Likewise. * unwind-dw2.c (_Unwind_GetGR, _Unwind_SetGR, execute_stack_op, execute_cfa_program, _Unwind_SetSpColumn, uw_update_context_1, uw_init_context_1): Likewise. * unwind.inc (_Unwind_RaiseException_Phase2, _Unwind_Resume, _Unwind_Resume_or_Rethrow): Likewise. * unwind-pe.h (__gxx_abort): Do not define. (size_of_encoded_value, base_of_encoded_value, read_encoded_value_with_base): Use gcc_unreachable. * unwind.h (_Unwind_GetTextRelBase): Likewise. From-SVN: r99835 --- gcc/unwind.inc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'gcc/unwind.inc') diff --git a/gcc/unwind.inc b/gcc/unwind.inc index 683e94a..dc4708e 100644 --- a/gcc/unwind.inc +++ b/gcc/unwind.inc @@ -72,8 +72,7 @@ _Unwind_RaiseException_Phase2(struct _Unwind_Exception *exc, } /* Don't let us unwind past the handler context. */ - if (match_handler) - abort (); + gcc_assert (!match_handler); uw_update_context (context, &fs); } @@ -144,8 +143,8 @@ _Unwind_RaiseException(struct _Unwind_Exception *exc) /* Subroutine of _Unwind_ForcedUnwind also invoked from _Unwind_Resume. */ static _Unwind_Reason_Code -_Unwind_ForcedUnwind_Phase2(struct _Unwind_Exception *exc, - struct _Unwind_Context *context) +_Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc, + struct _Unwind_Context *context) { _Unwind_Stop_Fn stop = (_Unwind_Stop_Fn) (_Unwind_Ptr) exc->private_1; void *stop_argument = (void *) (_Unwind_Ptr) exc->private_2; @@ -235,8 +234,7 @@ _Unwind_Resume (struct _Unwind_Exception *exc) else code = _Unwind_ForcedUnwind_Phase2 (exc, &cur_context); - if (code != _URC_INSTALL_CONTEXT) - abort (); + gcc_assert (code == _URC_INSTALL_CONTEXT); uw_install_context (&this_context, &cur_context); } @@ -261,8 +259,7 @@ _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *exc) code = _Unwind_ForcedUnwind_Phase2 (exc, &cur_context); - if (code != _URC_INSTALL_CONTEXT) - abort (); + gcc_assert (code == _URC_INSTALL_CONTEXT); uw_install_context (&this_context, &cur_context); } -- cgit v1.1