diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-05-17 15:37:47 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2005-05-17 15:37:47 +0000 |
commit | 79d0dfa314d6b7d1db89735809d7f7f19b5efd86 (patch) | |
tree | 386dad5929e3765399d5b24a1e7d76be228b6d15 /gcc/unwind-dw2-fde.c | |
parent | d0f11b16532d9c96c3a32ec284bd4470c67ba4b4 (diff) | |
download | gcc-79d0dfa314d6b7d1db89735809d7f7f19b5efd86.zip gcc-79d0dfa314d6b7d1db89735809d7f7f19b5efd86.tar.gz gcc-79d0dfa314d6b7d1db89735809d7f7f19b5efd86.tar.bz2 |
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
Diffstat (limited to 'gcc/unwind-dw2-fde.c')
-rw-r--r-- | gcc/unwind-dw2-fde.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/unwind-dw2-fde.c b/gcc/unwind-dw2-fde.c index ab1f7bc..15cdd57 100644 --- a/gcc/unwind-dw2-fde.c +++ b/gcc/unwind-dw2-fde.c @@ -164,7 +164,7 @@ __register_frame_table (void *begin) from crtbegin (wherein it is declared weak), and this object does not get pulled from libgcc.a for other reasons, then the invocation of __deregister_frame_info will be resolved from glibc. - Since the registration did not happen there, we'll abort. + Since the registration did not happen there, we'll die. Therefore, declare a new deregistration entry point that does the exact same thing, but will resolve to the same library as @@ -212,11 +212,9 @@ __deregister_frame_info_bases (const void *begin) } } - __gthread_mutex_unlock (&object_mutex); - abort (); - out: __gthread_mutex_unlock (&object_mutex); + gcc_assert (ob); return (void *) ob; } @@ -255,8 +253,9 @@ base_from_object (unsigned char encoding, struct object *ob) return (_Unwind_Ptr) ob->tbase; case DW_EH_PE_datarel: return (_Unwind_Ptr) ob->dbase; + default: + gcc_unreachable (); } - abort (); } /* Return the FDE pointer encoding from the CIE. */ @@ -441,8 +440,7 @@ fde_split (struct object *ob, fde_compare_t fde_compare, /* This should optimize out, but it is wise to make sure this assumption is correct. Should these have different sizes, we cannot cast between them and the overlaying onto ERRATIC will not work. */ - if (sizeof (const fde *) != sizeof (const fde **)) - abort (); + gcc_assert (sizeof (const fde *) == sizeof (const fde **)); for (i = 0; i < count; i++) { @@ -566,8 +564,7 @@ end_fde_sort (struct object *ob, struct fde_accumulator *accu, size_t count) { fde_compare_t fde_compare; - if (accu->linear && accu->linear->count != count) - abort (); + gcc_assert (!accu->linear || accu->linear->count == count); if (ob->s.b.mixed_encoding) fde_compare = fde_mixed_encoding_compare; @@ -579,8 +576,7 @@ end_fde_sort (struct object *ob, struct fde_accumulator *accu, size_t count) if (accu->erratic) { fde_split (ob, fde_compare, accu->linear, accu->erratic); - if (accu->linear->count + accu->erratic->count != count) - abort (); + gcc_assert (accu->linear->count + accu->erratic->count == count); frame_heapsort (ob, fde_compare, accu->erratic); fde_merge (ob, fde_compare, accu->linear, accu->erratic); free (accu->erratic); |