gcc/libgcc/unwind-dw2.h

81 lines
2.4 KiB
C
Raw Normal View History

Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
/* DWARF2 frame unwind data structure.
Copyright (C) 1997-2018 Free Software Foundation, Inc.
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
/* The result of interpreting the frame unwind info for a frame.
This is all symbolic at this point, as none of the values can
be resolved until the target pc is located. */
typedef struct
{
/* Each register save state can be described in terms of a CFA slot,
another register, or a location expression. */
struct frame_state_reg_info
{
struct {
union {
_Unwind_Word reg;
_Unwind_Sword offset;
const unsigned char *exp;
} loc;
enum {
REG_UNSAVED,
REG_SAVED_OFFSET,
REG_SAVED_REG,
REG_SAVED_EXP,
REG_SAVED_VAL_OFFSET,
REG_SAVED_VAL_EXP,
REG_UNDEFINED
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
} how;
Use -fbuilding-libgcc for more target macros used in libgcc. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Also define __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__, __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__, __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__, __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__, __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__, __LIBGCC_STACK_GROWS_DOWNWARD__, __LIBGCC_DONT_USE_BUILTIN_SETJMP__, __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__, __LIBGCC_DWARF_FRAME_REGISTERS__, __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__, __LIBGCC_STACK_POINTER_REGNUM__ and __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc. (builtin_define_with_value): Handle backslash-escaping in string macro values. libgcc: * Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc. * config/aarch64/linux-unwind.h (STACK_POINTER_REGNUM): Change all uses to __LIBGCC_STACK_POINTER_REGNUM__. (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/alpha/vms-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change use to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/cr16/unwind-cr16.c (STACK_GROWS_DOWNWARD): Change all uses to __LIBGCC_STACK_GROWS_DOWNWARD__. (DWARF_FRAME_REGISTERS): Change all uses to __LIBGCC_DWARF_FRAME_REGISTERS__. (EH_RETURN_STACKADJ_RTX): Change all uses to __LIBGCC_EH_RETURN_STACKADJ_RTX__. * config/cr16/unwind-dw2.h (DWARF_FRAME_REGISTERS): Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. Remove conditional definition. * config/i386/cygming-crtbegin.c (EH_FRAME_SECTION_NAME): Change use to __LIBGCC_EH_FRAME_SECTION_NAME__. (JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__. * config/i386/cygming-crtend.c (EH_FRAME_SECTION_NAME): Change use to __LIBGCC_EH_FRAME_SECTION_NAME__. (JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__ * config/mips/linux-unwind.h (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/nios2/linux-unwind.h (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. * config/pa/hpux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/pa/linux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/rs6000/aix-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. (STACK_POINTER_REGNUM): Change all uses to __LIBGCC_STACK_POINTER_REGNUM__. * config/rs6000/darwin-fallback.c (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. * config/rs6000/linux-unwind.h (STACK_POINTER_REGNUM): Change all uses to __LIBGCC_STACK_POINTER_REGNUM__. * config/sparc/linux-unwind.h (DWARF_FRAME_REGISTERS): Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. * config/sparc/sol2-unwind.h (DWARF_FRAME_REGISTERS): Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. * config/tilepro/linux-unwind.h (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. * config/xtensa/unwind-dw2-xtensa.h (DWARF_FRAME_REGISTERS): Remove conditional definition. * crtstuff.c (TEXT_SECTION_ASM_OP): Change all uses to __LIBGCC_TEXT_SECTION_ASM_OP__. (EH_FRAME_SECTION_NAME): Change all uses to __LIBGCC_EH_FRAME_SECTION_NAME__. (EH_TABLES_CAN_BE_READ_ONLY): Change all uses to __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__. (CTORS_SECTION_ASM_OP): Change all uses to __LIBGCC_CTORS_SECTION_ASM_OP__. (DTORS_SECTION_ASM_OP): Change all uses to __LIBGCC_DTORS_SECTION_ASM_OP__. (JCR_SECTION_NAME): Change all uses to __LIBGCC_JCR_SECTION_NAME__. (INIT_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_SECTION_ASM_OP__. (INIT_ARRAY_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__. * generic-morestack.c (STACK_GROWS_DOWNWARD): Change all uses to __LIBGCC_STACK_GROWS_DOWNWARD__. * libgcc2.c (INIT_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_SECTION_ASM_OP__. (INIT_ARRAY_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__. (EH_FRAME_SECTION_NAME): Change all uses to __LIBGCC_EH_FRAME_SECTION_NAME__. * libgcov-profiler.c (VTABLE_USES_DESCRIPTORS): Remove conditional definitions. Change all uses to __LIBGCC_VTABLE_USES_DESCRIPTORS__. * unwind-dw2.c (STACK_GROWS_DOWNWARD): Change all uses to __LIBGCC_STACK_GROWS_DOWNWARD__. (DWARF_FRAME_REGISTERS): Change all uses to __LIBGCC_DWARF_FRAME_REGISTERS__. (EH_RETURN_STACKADJ_RTX): Change all uses to __LIBGCC_EH_RETURN_STACKADJ_RTX__. * unwind-dw2.h (DWARF_FRAME_REGISTERS): Remove conditional definition. Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. * unwind-sjlj.c (DONT_USE_BUILTIN_SETJMP): Change all uses to __LIBGCC_DONT_USE_BUILTIN_SETJMP__. (JMP_BUF_SIZE): Change use to __LIBGCC_JMP_BUF_SIZE__. From-SVN: r214954
2014-09-05 14:03:46 +02:00
} reg[__LIBGCC_DWARF_FRAME_REGISTERS__+1];
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
/* Used to implement DW_CFA_remember_state. */
struct frame_state_reg_info *prev;
/* The CFA can be described in terms of a reg+offset or a
location expression. */
_Unwind_Sword cfa_offset;
_Unwind_Word cfa_reg;
const unsigned char *cfa_exp;
enum {
CFA_UNSET,
CFA_REG_OFFSET,
CFA_EXP
} cfa_how;
} regs;
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
/* The PC described by the current frame state. */
void *pc;
/* The information we care about from the CIE/FDE. */
_Unwind_Personality_Fn personality;
_Unwind_Sword data_align;
_Unwind_Word code_align;
_Unwind_Word retaddr_column;
unsigned char fde_encoding;
unsigned char lsda_encoding;
unsigned char saw_z;
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
unsigned char signal_frame;
Index: gcc/ChangeLog 2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-07-01 06:09:07 +02:00
void *eh_ptr;
} _Unwind_FrameState;