Ted Phelps
dfd503426c
re PR c++/34152 (Erratic behaviour: Exception translation (throw from signal handlers))
...
PR c++/34152
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check
_GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO.
From-SVN: r131361
2008-01-06 21:25:57 +01:00
Richard Earnshaw
ddb4f387ee
eh_arm.cc (__cxa_type_match): Handle foreign exceptions.
...
* libsupc++/eh_arm.cc (__cxa_type_match): Handle foreign
exceptions.
* libsubpc++/eh_personality.cc: Don't try to set up foreign or
forced unwind types here when using the ARM EABI unwinder.
From-SVN: r125683
2007-06-13 19:31:58 +00:00
Jason Merrill
d05f74f16e
re PR other/28145 (C++ (throw() and catch(...) {/* fall through */ } ) and pthread cancellation are incompatible (at least with NPTL))
...
PR c++/28145
* libsupc++/cxxabi.h (__forced_unwind, __foreign_exception):
New classes.
* libsupc++/eh_exception.cc: Define their destructors.
* config/abi/pre/gnu.ver: Export their type_infos.
* config/abi/pre/gnu-versioned-namespace.ver: Likewise.
* libsupc++/eh_personality.cc: A handler for abi::__forced_unwind
matches a forced unwind, and a handler for abi::__foreign_exception
matches a foreign exception.
* include/bits/istream.tcc: Rethrow forced unwind.
* include/bits/ostream.tcc: Likewise.
* include/bits/ostream_insert.h: Likewise.
* include/bits/basic_string.tcc (operator>>, getline): Likewise.
* include/bits/fstream.tcc (basic_filebuf::close): Likewise.
* include/ext/vstring.cc (operator>>, getline): Likewise.
* src/istream.cc: Likewise.
* src/compatibility.cc (basic_istream::ignore): Likewise.
* include/std/bitset (operator>>): Likewise.
* include/std/fstream (basic_filebuf::close): Remove throw() spec.
* libsupc++/cxxabi-internal.h: Split out from...
* libsupc++/cxxabi.h: ...here.
From-SVN: r124517
2007-05-07 17:27:54 -04:00
Andrew Pinski
ca32e64edd
eh_personality.cc (PERSONALITY_FUNCTION): Replace _Unwind_Word with _uleb128_t in the SJLJ context.
...
2007-01-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Replace
_Unwind_Word with _uleb128_t in the SJLJ context.
From-SVN: r121145
2007-01-24 14:45:20 -08:00
Andreas Krebbel
f767122b2e
unwind-dw2-fde.c (get_cie_encoding): Replaced _Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
...
2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
* unwind-dw2-fde.c (get_cie_encoding): Replaced _Unwind_Word with
_uleb128_t and _Unwind_SWord with _sleb128_t.
* unwind-dw2.c (extract_cie_info, execute_stack_op, execute_cfa_program,
uw_frame_state_for, uw_update_context_1): Likewise.
* unwind-c.c (parse_lsda_header, PERSONALITY_FUNCTION): Likewise.
* unwind-pe.h (read_uleb128, read_sleb128,
read_encoded_value_with_base): Likewise.
* unwind-generic.h: Define _sleb128_t and _uleb128_t types.
2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
* libsupc++/eh_personality.cc (parse_lsda_header, check_exception_spec,
get_ttype_entry, empty_exception_spec, PERSONALITY_FUNCTION): Replaced
_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
* exception.cc (parse_lsda_header, PERSONALITY_FUNCTION): Replaced
_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
From-SVN: r121116
2007-01-24 14:46:47 +00:00
Joseph Myers
46fb6400ee
eh_globals.cc (__cxxabiv1::__cxa_get_globals): Initialize propagatingExceptions if __ARM_EABI_UNWINDER__.
...
* libsupc++/eh_globals.cc (__cxxabiv1::__cxa_get_globals):
Initialize propagatingExceptions if __ARM_EABI_UNWINDER__.
* libsupc++/eh_personality.cc (empty_exception_spec): Define
separately in __ARM_EABI_UNWINDER__ case.
From-SVN: r118757
2006-11-13 13:28:28 +00:00
Steve Ellcey
2e5757965d
re PR target/26792 (need to use autoconf when using newly-added libgcc functions)
...
PR target/26792
* configure.ac: Use GCC_CHECK_UNWIND_GETIPINFO to
define HAVE_GETIPINFO.
* aclocal.m4: Add include of ../config/unwind_ipinfo.m4.
* config.h.in: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* libmath/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* libsupc++/eh_personality.cc: Check HAVE_GETIPINFO.
From-SVN: r115654
2006-07-21 21:11:46 +00:00
Jason Merrill
f325272c07
eh_personality.cc: Wrap extern C function definitions in namespace __cxxabiv1.
...
* libsupc++/eh_personality.cc: Wrap extern C function
definitions in namespace __cxxabiv1.
From-SVN: r115652
2006-07-21 17:06:19 -04:00
Jakub Jelinek
754e45a867
re PR other/26208 (Serious problem with unwinding through signal frames)
...
PR other/26208
* unwind-dw2.c (struct _Unwind_Context): Add signal_frame field.
(extract_cie_info): Handle S flag in augmentation string.
(execute_cfa_program): If context->signal_frame, execute also
fs->pc == context->ra instructions.
(uw_frame_state_for): If context->signal_frame, don't subtract one
from context->ra to find FDE.
(uw_update_context_1): Set context->signal_frame to
fs->signal_frame.
(_Unwind_GetIPInfo): New function.
* unwind-dw2.h (_Unwind_FrameState): Add signal_frame field.
* unwind-c.c (PERSONALITY_FUNCTION): Use _Unwind_GetIPInfo instead
of _Unwind_GetIP.
* unwind-sjlj.c (_Unwind_GetIPInfo): New function.
* unwind-generic.h (_Unwind_GetIPInfo): New prototype.
* unwind-compat.c (_Unwind_GetIPInfo): New function.
* libgcc-std.ver (_Unwind_GetIPInfo): Export @@GCC_4.2.0.
* config/ia64/unwind-ia64.c (_Unwind_GetIPInfo): New function.
* config/arm/unwind-arm.h (_Unwind_GetIPInfo): Define.
* config/i386/linux-unwind.h (x86_fallback_frame_state,
x86_64_fallback_frame_state): Set fs->signal_frame.
* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Likewise.
(MD_FROB_UPDATE_CONTEXT): Define unconditionally.
(frob_update_context): Likewise. Workaround missing S flag in
Linux 2.6.12 - 2.6.16 kernel vDSOs.
* config/s390/linux-unwind.h (s390_fallback_frame_state): Likewise.
Remove the psw_addr + 1 hack.
libjava/
* exception.cc (PERSONALITY_FUNCTION): Use _Unwind_GetIPInfo instead
of _Unwind_GetIP.
* include/i386-signal.h (MAKE_THROW_FRAME): Change into empty macro.
(HANDLE_DIVIDE_OVERFLOW): Don't adjust _res->eip if falling through
to throw.
* include/x86_64-signal.h (MAKE_THROW_FRAME): Change into empty
macro.
* include/powerpc-signal.h (MAKE_THROW_FRAME): Change into empty
macro.
libstdc++-v3/
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
_Unwind_GetIPInfo instead of _Unwind_GetIP.
From-SVN: r111488
2006-02-27 18:26:26 +01:00
Benjamin Kosnik
a1c88e064f
configopts.html: Tweak docs.
...
2006-01-25 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/configopts.html: Tweak docs.
* libsupc++/eh_personality.cc: Fix typos.
From-SVN: r110218
2006-01-25 18:22:34 +00:00
Paul Brook
ddfd0d910b
eh_personality.cc (PERSONALITY_FUNCTION): Use std::abort.
...
2006-01-18 Paul Brook <paul@codesourcery.com>
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Use std::abort.
From-SVN: r109896
2006-01-18 16:31:00 +00:00
Benjamin Kosnik
b967bf2560
del_op.cc: Include c++config.h first.
...
2005-11-21 Benjamin Kosnik <bkoz@redhat.com>
* libsupc++/del_op.cc: Include c++config.h first.
* libsupc++/eh_alloc.cc: Same.
* libsupc++/new_opv.cc: Same.
* libsupc++/eh_throw.cc: Same.
* libsupc++/new_op.cc: Same.
* libsupc++/del_opv.cc: Same.
* libsupc++/eh_catch.cc: Same.
* libsupc++/guard.cc: Same.
* libsupc++/del_opnt.cc: Same.
* libsupc++/eh_exception.cc: Same.
* libsupc++/new_opvnt.cc: Same.
* libsupc++/eh_term_handler.cc: Same.
* libsupc++/eh_personality.cc: Same.
* libsupc++/eh_call.cc: Same.
* libsupc++/new_opnt.cc: Same.
* libsupc++/del_opvnt.cc: Same.
2005-11-21 Benjamin Kosnik <bkoz@redhat.com>
* src/Makefile.am (LTCXXCOMPILE): CXXFLAGS last.
* libsupc++/Makefile.am: Same.
* src/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Same.
From-SVN: r107343
2005-11-22 00:19:07 +00:00
Nathan Sidwell
1dcca6f361
unwind-arm.h: Reorder interface function declarations.
...
2005-11-16 Nathan Sidwell <nathan@codesourcery.com>
gcc/
* config/arm/unwind-arm.h: Reorder interface function declarations.
(_URC_END_OF_STACK): New enumeration value.
(_US_UNWIND_ACTION_MASK, _US_FORCE_UNWIND, _US_END_OF_STACK): Likewise.
(struct _Unwind_Control_Block): Document reserved field use.
(_Unwind_Stop_Fn): New typedef.
(_Unwind_ForcedUnwind): Declare.
(_Unwind_Resume_or_Rethrow): Declare.
* config/arm/libunwind.S (UNWIND_WRAPER): Add nargs
argument. Adjust.
(_Unwind_Resume_or_Rethrow, _Unwind_ForcedUnwind): New.
* config/arm/unwind-arm.c (UCB_FORCED_STOP_FN)
(UCB_FORCED_STOP_ARG): New.
(search_EIT_table): Update boundary condition checks.
(get_eit_entry): Return _URC_END_OF_STACK when cannot unwind.
(unwind_phase2): Replace for with do..while.
(unwind_phase2_forced): New.
(__gnu_Unwind_RaiseException): Replace for with do..while.
(__gnu_Unwind_ForcedUnwind): New.
(__gnu_Unwind_Resume): Set FORCE_UNWIND flag, if forced unwinding.
Use appropriate phase2 unwinder.
(__gnu_Unwind_Resume_or_Rethrow): New.
(__gnu_unwind_pr_common): Cope with forced unwinding.
gcc/testsuite/
* g++.dg/eh/forced1.C: Adjust to cope with ARM EABI
structures.
* g++.dg/eh/forced2.C: Likewise.
* g++.dg/eh/forced3.C: Likewise.
* g++.dg/eh/forced4.C: Likewise.
libstdc++-v3/
* libsupc++/eh_arm.cc (__cxa_begin_cleanup): Remember a
foreign exception too.
(__gnu_end_cleanup): Recover a foreign exception too.
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Cope
with forced unwinding.
* libsupc++/eh_throw.cc (__cxxabiv1::__cxa_rethrow): Use
_Unwind_Resume_or_Rethrow for ARM EABI.
From-SVN: r107089
2005-11-16 17:04:41 +00:00
Kelley Cook
83f517994d
All files: Update FSF address.
...
2005-08-17 Kelley Cook <kcook@gcc.gnu.org>
* All files: Update FSF address.
From-SVN: r103192
2005-08-17 02:28:44 +00:00
H.J. Lu
216edb224f
re PR libstdc++/22284 (ia64 exception handling broken)
...
2005-07-29 H.J. Lu <hongjiu.lu@intel.com>
PR libstdc++/22284
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Revert
the change to info.ttype_base.
From-SVN: r102552
2005-07-29 06:35:59 -07:00
Paul Brook
617a1b7144
Makefile.in: Set and use UNWIND_H.
...
2005-06-28 Paul Brook <paul@codesourcery.com>
gcc/
* Makefile.in: Set and use UNWIND_H. Install as unwind.h.
* c-decl.c (finish_decl): Call default_init_unwind_resume_libfunc.
* except.c (add_ehspec_entry): Generate arm eabi filter lists.
(assign_filter_values): Ditto.
(output_ttype): New function.
(output_function_exception_table): Use output_ttype. Generate arm
eabi filter lists.
(default_init_unwind_resume_libfunc): New function.
* except.h (default_init_unwind_resume_libfunc): Add prototype.
* optabs.c (init_optabs): Don't set unwind_resume_libfunc.
* opts.c (decode_options): Use targetm.unwind_tables_default.
* target-def.h (TARGET_ASM_TTYPE): Provide and use definition.
(TARGET_ARM_EABI_UNWINDER, TARGET_UNWIND_TABLES_DEFAULT): Ditto.
* target.h (struct gcc_target): Add asm.ttype, unwind_tables_default
and arm_eabi_unwinder.
* unwind-c.c: Support Arm EABI unwinder.
* unwind.h: Rename ...
* unwind-generic.h: ... To this.
* doc/tm.texi (TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Document.
(TARGET_UNWID_TABLES_DEFAULT): Document.
* config/arm/arm-protos.h (arm_output_fn_unwind): Add prototype.
* config/arm/arm.c (arm_unwind_emit, arm_output_ttype): New functions.
(TARGET_UNWIND_EMIT, TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER):
Define.
(thumb_pushpop, thumb_output_function_prologue): Output unwinding
directives.
(arm_unwind_emit_stm, arm_unwind_emit_set): New functions.
* config/arm/arm.h (MUST_USE_SJLJ_EXCEPTIONS): Only define when
!TARGET_UNWIND_INFO.
(ARM_OUTPUT_FN_UNWIND, ARM_EABI_UNWIND_TABLES): Define.
* config/arm/bpabi.h (TARGET_UNWIND_INFO): Define.
* config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME,
ASM_DECLARE_FUNCTION_SIZE): Use ARM_OUTPUT_FN_UNWIND.
* config/arm/lib1funcs.asm: Include libunwind.S.
* config/arm/libgcc-bpabi.ver: Add unwinding routines.
* config/arm/libunwind.S: New file.
* config/arm/pr-support.c: New file.
* config/arm/t-bpabi (LIB1ASMFUNCS): Add _unwind.
(UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set.
* config/arm/t-symbian (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set.
* config/arm/unwind-arm.c: New file.
* config/arm/unwind-arm.h: New file.
* config/i386/t-netware (USER_H): Remove unwind.h.
* config/ia64/ia64.h (TARGET_UNWIND_TABLES_DEFAULT): Define.
gcc/cp/
* Make-lang.in (cp/except.o): Depend on $(TARGET_H)
* except.c: Include target.h.
(init_exception_processing): Initialize unwind_resume_libfunc.
* doc/tm.texi: Document TARGET_ASM_TTYPE
gcc/ada/
* misc.c (gnat_init_gcc_eh): Call default_init_unwind_resume_libfunc.
gcc/java/
* decl.c (java_init_decl_processing): Call
default_init_unwind_resume_libfunc.
gcc/objc/
* objc-act.c (objc_init_exceptions): Call
default_init_unwind_resume_libfunc.
libstdc++/
* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for
__cxa_end_cleanup.
* libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c.
* libsupc++/eh_arm.cc: New file.
* libsupc++/eh_call.cc: New file.
* libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use
__gxx_caught_object.
(__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call
_Unwind_Complete when using the ARM EABI.
(__cxa_end_catch): Use __is_gxx_exception_class.
* libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when
using the ARM EABI.
(save_caught_exception, restore_caught_exception): New functions.
(_throw_typet): New typedef.
(get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM
EABI implementations.
(PERSONALITY_FUNCTION): Use new functions. Addd support for ARM EABI
unwinding libary.
(__cxa_unexpected): Disable when using the ARM EABI.
* libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS.
(__cxa_rethrow): Use __is_gxx_exception_class. Call
_Unwind_RaiseException when using the ARM EABI.
* libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM
EABI semantics.
(struct __cxa_eh_globals): Ditto.
(__cxa_call_terminate): Add prototype.
(__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add
prototypes.
(__get_exception_header_from_obj, __get_exception_header_from_ue):
Move earlier in file.
(__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS,
__gxx_caught_object): New functions.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libmath/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* src/Makefie.in: Regenerate.
* testsuite/makefile.in: Regenerate.
From-SVN: r101385
2005-06-28 19:52:27 +00:00
Jan Beulich
7a774cac88
unwind-compat.c: Include tconfig.h and tsystem.h.
...
gcc/
2005-05-19 Jan Beulich <jbeulich@novell.com>
* unwind-compat.c: Include tconfig.h and tsystem.h.
* unwind-dw2-fde-compat.c: Likewise.
libstdc++-v3/
2005-05-19 Jan Beulich <jbeulich@novell.com>
* libsupc++/unwind-cxx.h: Include cstdlib.
(gcc_unreachable): #define.
* libsupc++/eh_personality.cc (gcc_unreachable): Remove #define.
From-SVN: r99952
2005-05-19 06:47:50 +00:00
Nathan Sidwell
79d0dfa314
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
2005-05-17 15:37:47 +00:00
James E Wilson
664fc5df4a
re PR libstdc++/5625 ([mips] exception unwinding creates invalid pointer on mips)
...
PR libstdc++/5625
* libsuspc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
__builtin_extend_pointer.
From-SVN: r77555
2004-02-09 13:20:33 -08:00
Benjamin Kosnik
3d7c150e3f
Move from CPP to CXX.
...
2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
Move from CPP to CXX.
* include/bits/c++config: Move to GLIBCXX from GLIBCPP.
* testsuite/Makefile.am: Same.
* testsuite/Makefile.in: Regenerate.
* po/Makefile.am: Same.
* po/Makefile.in: Regenerate.
* libsupc++/Makefile.am: Same.
* libsupc++/Makefile.in: Regenerate.
* libmath/Makefile.am: Same.
* libmath/Makefile.in: Regenerate.
* include/Makefile.am: Same.
* include/Makefile.in: Regenerate.
* src/Makefile.am: Same.
* src/Makefile.in: Regenerate.
* acconfig.h: Same.
* configure.host: Same.
* configure.in: Same.
* configure: Regenerate.
* acinclude.m4: Same.
* aclocal.m4: Same.
* src: Change all files in this directory.
* testsuite: Same.
* include: Same, standardize include guards.
* config: Same.
* libsupc++: Same.
From-SVN: r68958
2003-07-05 04:05:45 +00:00
Nathanael Nerode
cbecceb923
Makefile.am, [...]: Replace "GNU CC" with "GCC".
...
2003-05-24 Nathanael Nerode <neroden@gcc.gnu.org>
* libsupc++/Makefile.am, libsupc++/cxxabi.h, libsupc++/del_op.cc,
libsupc++/del_opnt.cc, libsupc++/del_opv.cc, libsupc++/del_opvnt.cc,
libsupc++/eh_alloc.cc, libsupc++/eh_aux_runtime.cc,
libsupc++/eh_catch.cc, libsupc++/eh_exception.cc,
libsupc++/eh_globals.cc, libsupc++/eh_personality.cc,
libsupc++/eh_term_handler.cc, libsupc++/eh_terminate.cc,
libsupc++/eh_throw.cc, libsupc++/eh_type.cc,
libsupc++/eh_unex_handler.cc, libsupc++/exception,
libsupc++/new, libsupc++/new_handler.cc, libsupc++/new_op.cc,
libsupc++/new_opnt.cc, libsupc++/new_opv.cc, libsupc++/new_opvnt.cc,
libsupc++/pure.cc, libsupc++/tinfo.cc, libsupc++/tinfo2.cc,
libsupc++/typeinfo, libsupc++/unwind-cxx.h, libsupc++/vec.cc:
Replace "GNU CC" with "GCC".
From-SVN: r67155
2003-05-24 16:22:03 +00:00
Richard Henderson
a944ceb94a
except.c: Revert 04-01 and 04-02 forced-unwind changes.
...
gcc/
* except.c: Revert 04-01 and 04-02 forced-unwind changes.
* flags.h, toplev.c, doc/invoke.texi: Likewise.
* unwind-dw2.c (_Unwind_GetCFA): Fix ptr->int conversion warning.
* unwind.inc (_Unwind_DeleteException): Check for null
exception_cleanup.
* unwind-sjlj.c (_Unwind_SjLj_Resume_or_Rethrow): New.
* unwind.inc (_Unwind_Resume_or_Rethrow): New.
* unwind.h: Declare them.
* libgcc-std.ver (GCC_3.3): Export them.
gcc/cp/
* cfns.gperf: Comment out POSIX thread cancellation points,
plus abort and raise.
* cfns.h: Regenerate.
gcc/testsuite/
* g++.dg/eh/forced1.C: Expect catch-all handlers to run.
Verify exception_cleanup not called for rethrows.
* g++.dg/eh/forced2.C: Test that exception_cleanup is called
when exiting catch block without rethrowing.
* g++.dg/eh/forced3.C: New.
* g++.dg/eh/forced4.C: New.
libstdc++-v3/
* libsupc++/eh_catch.cc (__cxa_begin_catch): Handle foreign exceptions.
(__cxa_end_catch): Likewise.
* libsupc++/eh_throw.cc (__cxa_rethrow): Likewise. Use
_Unwind_Resume_or_Rethrow.
* libsupc++/eh_personality.cc (empty_exception_spec): New.
(PERSONALITY_FUNCTION): Don't ignore terminate or catch-all
for _UA_FORCE_UNWIND. Honor empty filter spec for foreign
exceptions. Don't push terminate/unexpected to cxa functions.
(__cxa_call_unexpected): Remove foreign exception fixmes.
From-SVN: r66583
2003-05-07 15:11:38 -07:00
Steve Ellcey
cb94b1559a
unwind-cxx.h (__cxa_exception): Change catchTemp type from void* to _Unwind_Ptr.
...
* libstdc++-v3/libsupc++/unwind-cxx.h (__cxa_exception):
Change catchTemp type from void* to _Unwind_Ptr.
* libstdc++-v3/libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
Do not cast landing_pad or base_of_encoded_value to (void *).
* libstdc++-v3/libsupc++/eh_throw.cc (__gxx_exception_cleanup):
Accept _URC_NO_REASON as a valid reason code.
From-SVN: r56352
2002-08-15 18:05:41 +00:00
Richard Henderson
afaef72670
re PR c++/3719 (Unable to retrow exception in unexpected exception handler.)
...
PR c++/3719
* libsupc++/eh_personality.cc (__cxa_call_unexpected): Copy handler
data out of the exception struct before calling unexpectedHandler.
* g++.dg/eh/unexpected1.C: New.
From-SVN: r51623
2002-03-30 18:56:34 -08:00
Jason Merrill
6afcef6bd2
re PR c++/4381 (Exceptions virtually inherited from a class cause segmentation fault at run time)
...
PR c++/4381
* libsupc++/eh_personality.cc (get_adjusted_ptr): New static fn.
(check_exception_spec): Call it. Take the thrown pointer.
(__cxa_call_unexpected): Pass it.
(PERSONALITY_FUNCTION): Likewise. Use get_adjusted_ptr.
From-SVN: r50936
2002-03-17 19:09:37 -05:00
Jason Merrill
74a3070ffa
eh_personality.cc (__cxa_call_unexpected): Take void*.
...
* libsupc++/eh_personality.cc (__cxa_call_unexpected): Take void*.
* libsupc++/eh_catch.cc (__cxa_begin_catch): Likewise.
* libsupc++/unwind-cxx.h: Adjust.
* src/Makefile.am (strstream.o): Pass -Wno-deprecated.
* libsupc++/eh_type.cc (__cxa_current_exception_type): New file.
* libsupc++/cxxabi.h: Declare it.
* libsupc++/Makefile.am (sources): Add it.
* src/vterminate.cc (verbose_terminate_handler): New file.
* libsupc++/exception: Declare it.
* src/Makefile.am (sources): Add it.
* src/Makefile.am (VPATH): Check the src directory before the top one.
From-SVN: r47132
2001-11-17 21:09:23 -05:00
Benjamin Kosnik
322821b9ad
Make -fno-exceptions work.
...
2001-10-23 Benjamin Kosnik <bkoz@redhat.com>
Make -fno-exceptions work.
* config/locale/c_locale_gnu.cc: Use functexcept.
* include/bits/c++config (__stl_assert): Remove.
(__STL_USE_EXCEPTIONS): Same.
(__STL_TRY): Same.
(__STL_CATCH_ALL): Same.
(__STL_THROW): Same.
(__STL_RETHROW): Same.
(__STL_NOTHROW): Same.
(__STL_UNWIND): Same.
* include/bits/pthread_allocimpl.h: Fix.
* include/bits/std_bitset.h: Same.
* include/bits/std_list.h: Same.
* include/bits/std_memory.h: Same.
* include/bits/std_queue.h: Same.
* include/bits/stl_alloc.h: Same.
* include/bits/stl_deque.h: Same.
* include/bits/stl_list.h: Same.
* include/bits/stl_queue.h: Same.
* include/bits/stl_tempbuf.h: Same.
* include/bits/stl_tree.h: Same.
* include/bits/stl_uninitialized.h: Same.
* include/bits/stl_vector.h: Same.
* include/ext/ropeimpl.h: Same.
* include/ext/slist: Same.
* include/ext/stl_hashtable.h: Same.
* include/ext/stl_rope.h: Same.
* libsupc++/new_op.cc: Include cstdlib.
* libsupc++/eh_personality.cc: Add exception_defines include. Use
__throw_exception_again, tweak.
* libsupc++/eh_aux_runtime.cc: Include stdlib for abort.
* libsupc++/vec.cc: Tweak.
* src/functexcept.cc: Remove unused arguments.
* testsuite/23_containers/bitset_members.cc: Tweak.
From-SVN: r46455
2001-10-24 02:37:56 +00:00
Richard Sandiford
320daf529e
eh_personality.cc (parse_lsda_header): Change type of tmp from _Unwind_Ptr to _Unwind_Word.
...
* libsupc++/eh_personality.cc (parse_lsda_header): Change type of
tmp from _Unwind_Ptr to _Unwind_Word.
From-SVN: r45360
2001-09-03 12:24:24 +00:00
Jason Merrill
6c8d43e78d
exception.cc (PERSONALITY_FUNCTION): Simplify leb128 handling.
...
* exception.cc (PERSONALITY_FUNCTION): Simplify
leb128 handling.
From-SVN: r45317
2001-08-31 08:27:32 -04:00
Jason Merrill
a9985a921e
unwind-pe.h (read_uleb128, [...]): Move actual reading code here.
...
* unwind-pe.h (read_uleb128, read_sleb128): Move actual reading
code here. Take _Unwind_{W,Sw}ord*.
(read_encoded_value_with_base): Use them.
* unwind-dw2.c (_Unwind_FrameState): Make cfa_offset and cfa_reg
words.
(extract_cie_info): Simplify read_?leb128 handling.
(execute_stack_op, execute_cfa_program): Likewise.
* unwind-dw2-fde.c (get_cie_encoding): Likewise.
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Simplify
leb128 handling.
From-SVN: r45315
2001-08-31 05:49:13 -04:00
Richard Henderson
817e741108
eh_personality.cc: Include unwind-pe.h.
...
* libsupc++/eh_personality.cc: Include unwind-pe.h. Remove
all pointer encoding logic.
(struct lsda_header_info): Add ttype_base.
(get_ttype_entry): Use it instead of a context.
(check_exception_spec): Likewise.
(PERSONALITY_FUNCTION): Initialize ttype_base. Store it in
the c++ exception header for __cxa_call_unexpected.
(__cxa_call_unexpected): Use it.
From-SVN: r41982
2001-05-11 23:16:21 -07:00
Richard Henderson
52a11cbfcf
IA-64 ABI Exception Handling.
...
From-SVN: r40924
2001-03-28 03:04:51 -08:00