summaryrefslogtreecommitdiff
path: root/gcc/unwind-generic.h
Commit message (Collapse)AuthorAgeFilesLines
* Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.Jakub Jelinek2009-04-091-13/+10
| | | | From-SVN: r145841
* Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek2009-02-201-1/+1
| | | | From-SVN: r144324
* targhooks.h (struct gcc_target): New member unwind_word_mode.Ulrich Weigand2008-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * targhooks.h (struct gcc_target): New member unwind_word_mode. (default_unwind_word_mode): Add prototype. * targhooks.c (default_unwind_word_mode): New function. (default_eh_return_filter_mode): Return targetm.unwind_word_mode () instead of word_mode. * target-def.h (TARGET_UNWIND_WORD_MODE): New macro. (TARGET_INITIALIZER): Use it. * c-common.c (handle_mode_attribute): Support "unwind_word" mode attribute. * unwind-generic.h (_Unwind_Word, _Unwind_Sword): Use it. * except.c (init_eh): Use targetm.unwind_word_mode () instead of word_mode to access SjLj_Function_Context member "data". (sjlj_emit_dispatch_table): Likewise. Also, perform type conversion from targetm.eh_return_filter_mode () to targetm.unwind_word_mode () if they differ. * builtin-types.def (BT_UNWINDWORD): New primitive type. (BT_FN_UNWINDWORD_PTR): New function type. (BT_FN_WORD_PTR): Remove. * builtins.def (BUILT_IN_EXTEND_POINTER): Use BT_FN_UNWINDWORD_PTR. * except.c (expand_builtin_extend_pointer): Convert pointer to targetm.unwind_word_mode () instead of word_mode. * config/spu/spu-protos.h (spu_eh_return_filter_mode): Remove. * config/spu/spu.c (spu_eh_return_filter_mode): Remove. (spu_unwind_word_mode): New function. (TARGET_EH_RETURN_FILTER_MODE): Do not define. (TARGET_UNWIND_WORD_MODE): Define. * config/spu/t-spu-elf (TARGET_LIBGCC2_CFLAGS): Remove -D__word__=SI. From-SVN: r136912
* * unwind-generic.h: Fix comment typos.Ben Elliston2007-11-261-2/+2
| | | | From-SVN: r130423
* tm.texi (LIBGCC2_UNWIND_ATTRIBUTE): Document.Sandra Loosemore2007-09-141-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-09-14 Sandra Loosemore <sandra@codesourcery.com> Nigel Stephens <nigel@mips.com> gcc/ * doc/tm.texi (LIBGCC2_UNWIND_ATTRIBUTE): Document. * unwind-generic.h (LIBGCC2_UNWIND_ATTRIBUTE): Define. (_Unwind_RaiseException): Add LIBGCC2_UNWIND_ATTRIBUTE to declaration. (_Unwind_ForcedUnwind): Likewise. (_Unwind_Resume): Likewise. (_Unwind_Resume_or_Rethrow): Likewise. (_Unwind_Backtrace): Likewise. (_Unwind_SjLj_RaiseException): Likewise. (_Unwind_SjLj_ForcedUnwind): Likewise. (_Unwind_SjLj_Resume): Likewise. (_Unwind_SjLj_Resume_or_Rethrow): Likewise. * unwind.inc (_Unwind_RaiseException): Add LIBGCC2_UNWIND_ATTRIBUTE to definition. (_Unwind_ForcedUnwind): Likewise. (_Unwind_Resume): Likewise. (_Unwind_Resume_or_Rethrow): Likewise. (_Unwind_Backtrace): Likewise. * unwind-compat.c (_Unwind_Backtrace): Likewise. (_Unwind_ForcedUnwind): Likewise. (_Unwind_RaiseException): Likewise. (_Unwind_Resume): Likewise. (_Unwind_Resume_or_Rethrow): Likewise. * config/mips/mips.h (LIBGCC2_UNWIND_ATTRIBUTE): Define to force nomips16 mode when IN_LIBGCC2 with hard float. Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r128501
* unwind-generic.h (_sleb128_t, _uleb128_t): Don't use HAVE_LONG_LONG to ↵Richard Henderson2007-03-291-7/+5
| | | | | | | | | decide, but __SIZEOF_LONG_LONG__. * unwind-generic.h (_sleb128_t, _uleb128_t): Don't use HAVE_LONG_LONG to decide, but __SIZEOF_LONG_LONG__. From-SVN: r123352
* unwind-dw2-fde.c (get_cie_encoding): Replaced _Unwind_Word with _uleb128_t ↵Andreas Krebbel2007-01-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* re PR other/26208 (Serious problem with unwinding through signal frames)Jakub Jelinek2006-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Makefile.in: Set and use UNWIND_H.Paul Brook2005-06-281-0/+240
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: r101389