#include "tconfig.h"#include "tsystem.h"#include "coretypes.h"#include "tm.h"#include "dwarf2.h"#include "unwind.h"#include "unwind-pe.h"#include "unwind-dw2-fde.h"#include "gthr.h"#include "unwind-dw2.h"#include "unwind.inc"

Go to the source code of this file.
| #define DWARF_REG_TO_UNWIND_COLUMN | ( | REGNO | ) | (REGNO) |
Definition at line 60 of file unwind-dw2.c.
| #define EXTENDED_CONTEXT_BIT ((~(_Unwind_Word) 0 >> 2) + 1) |
Definition at line 76 of file unwind-dw2.c.
Referenced by _Unwind_IsExtendedContext(), and uw_init_context_1().
| #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS |
Definition at line 56 of file unwind-dw2.c.
| #define SIGNAL_FRAME_BIT ((~(_Unwind_Word) 0 >> 1) + 1) |
Definition at line 74 of file unwind-dw2.c.
Referenced by _Unwind_IsSignalFrame(), and _Unwind_SetSignalFrame().
| #define STACK_GROWS_DOWNWARD 0 |
Definition at line 48 of file unwind-dw2.c.
| #define uw_init_context | ( | CONTEXT | ) |
Value:
do \ { \ /* Do any necessary initialization to access arbitrary stack frames. \ On the SPARC, this means flushing the register windows. */ \ __builtin_unwind_init (); \ uw_init_context_1 (CONTEXT, __builtin_dwarf_cfa (), \ __builtin_return_address (0)); \ } \ while (0)
Definition at line 1382 of file unwind-dw2.c.
| #define uw_install_context | ( | CURRENT, | |||
| TARGET | ) |
Value:
do \ { \ long offset = uw_install_context_1 ((CURRENT), (TARGET)); \ void *handler = __builtin_frob_return_addr ((TARGET)->ra); \ __builtin_eh_return (offset, handler); \ } \ while (0)
Definition at line 1445 of file unwind-dw2.c.
| struct frame_state* __frame_state_for | ( | void * | pc_target, | |
| struct frame_state * | state_in | |||
| ) | [read] |
Definition at line 313 of file unwind-dw2.c.
References _Unwind_Find_FDE, _Unwind_FindTableEntry(), dwarf_eh_bases::func, NULL, and unw_table_entry::start_offset.
| _Unwind_Word _Unwind_GetCFA | ( | struct _Unwind_Context * | context | ) |
Definition at line 194 of file unwind-dw2.c.
References _Unwind_Context::cfa, and _Unwind_Context::psp.
| _Unwind_Ptr _Unwind_GetDataRelBase | ( | struct _Unwind_Context * | context | ) |
Definition at line 325 of file unwind-dw2.c.
References _Unwind_Context::bases, and dwarf_eh_bases::dbase.
| _Unwind_Word _Unwind_GetGR | ( | struct _Unwind_Context * | context, | |
| int | index | |||
| ) | [inline] |
Definition at line 157 of file unwind-dw2.c.
References _Unwind_IsExtendedContext(), _Unwind_Context::by_value, dwarf_reg_size_table, DWARF_REG_TO_UNWIND_COLUMN, DWARF_ZERO_REG, _Unwind_Context::eh_data, gcc_assert, _Unwind_Context::gp, ptr, _Unwind_Context::reg, ret, size, and unw_access_gr().
Referenced by __gnu_unwind_pr_common(), _Unwind_GetPtr(), execute_stack_op(), frob_update_context(), interpret_libc(), unwind_UCB_from_context(), uw_install_context_1(), uw_update_context(), and uw_update_context_1().
| static void* _Unwind_GetGRPtr | ( | struct _Unwind_Context * | context, | |
| int | index | |||
| ) | [inline, static] |
Definition at line 231 of file unwind-dw2.c.
References _Unwind_IsExtendedContext(), _Unwind_Context::by_value, DWARF_REG_TO_UNWIND_COLUMN, and _Unwind_Context::reg.
| _Unwind_Ptr _Unwind_GetIP | ( | struct _Unwind_Context * | context | ) | [inline] |
Definition at line 277 of file unwind-dw2.c.
References _Unwind_Context::ra, and _Unwind_Context::rp.
| _Unwind_Ptr _Unwind_GetIPInfo | ( | struct _Unwind_Context * | context, | |
| int * | ip_before_insn | |||
| ) | [inline] |
Definition at line 286 of file unwind-dw2.c.
References _Unwind_IsSignalFrame(), _Unwind_Context::ra, and _Unwind_Context::rp.
| void* _Unwind_GetLanguageSpecificData | ( | struct _Unwind_Context * | context | ) |
Definition at line 301 of file unwind-dw2.c.
References _Unwind_Context::lsda.
Referenced by PERSONALITY_FUNCTION().
| static void* _Unwind_GetPtr | ( | struct _Unwind_Context * | context, | |
| int | index | |||
| ) | [inline, static] |
| _Unwind_Ptr _Unwind_GetRegionStart | ( | struct _Unwind_Context * | context | ) |
Definition at line 307 of file unwind-dw2.c.
References _Unwind_Context::bases, dwarf_eh_bases::func, and _Unwind_Context::region_start.
Referenced by base_of_encoded_value(), and parse_lsda_header().
| _Unwind_Ptr _Unwind_GetTextRelBase | ( | struct _Unwind_Context * | context | ) |
Definition at line 331 of file unwind-dw2.c.
References _Unwind_Context::bases, and dwarf_eh_bases::tbase.
| static int _Unwind_GRByValue | ( | struct _Unwind_Context * | context, | |
| int | index | |||
| ) | [inline, static] |
Definition at line 268 of file unwind-dw2.c.
References _Unwind_Context::by_value, and DWARF_REG_TO_UNWIND_COLUMN.
Referenced by uw_update_context_1().
| static _Unwind_Word _Unwind_IsExtendedContext | ( | struct _Unwind_Context * | context | ) | [inline, static] |
Definition at line 149 of file unwind-dw2.c.
References EXTENDED_CONTEXT_BIT, and _Unwind_Context::flags.
Referenced by _Unwind_GetGR(), _Unwind_GetGRPtr(), _Unwind_SetGR(), and _Unwind_SetGRPtr().
| static _Unwind_Word _Unwind_IsSignalFrame | ( | struct _Unwind_Context * | context | ) | [inline, static] |
Definition at line 134 of file unwind-dw2.c.
References _Unwind_Context::flags, and SIGNAL_FRAME_BIT.
Referenced by _Unwind_GetIPInfo(), execute_cfa_program(), and uw_frame_state_for().
| void _Unwind_SetGR | ( | struct _Unwind_Context * | context, | |
| int | index, | |||
| _Unwind_Word | val | |||
| ) | [inline] |
Definition at line 202 of file unwind-dw2.c.
References _Unwind_IsExtendedContext(), _Unwind_Context::by_value, dwarf_reg_size_table, DWARF_REG_TO_UNWIND_COLUMN, _Unwind_Context::eh_data, gcc_assert, _Unwind_Context::gp, ptr, _Unwind_Context::reg, size, and unw_access_gr().
| static void _Unwind_SetGRPtr | ( | struct _Unwind_Context * | context, | |
| int | index, | |||
| void * | p | |||
| ) | [inline, static] |
Definition at line 242 of file unwind-dw2.c.
References _Unwind_IsExtendedContext(), _Unwind_Context::by_value, DWARF_REG_TO_UNWIND_COLUMN, and _Unwind_Context::reg.
| static void _Unwind_SetGRValue | ( | struct _Unwind_Context * | context, | |
| int | index, | |||
| _Unwind_Word | val | |||
| ) | [inline, static] |
Definition at line 253 of file unwind-dw2.c.
References _Unwind_Context::by_value, dwarf_reg_size_table, DWARF_REG_TO_UNWIND_COLUMN, gcc_assert, and _Unwind_Context::reg.
Referenced by uw_update_context_1().
| void _Unwind_SetIP | ( | struct _Unwind_Context * | context, | |
| _Unwind_Ptr | val | |||
| ) | [inline] |
Definition at line 295 of file unwind-dw2.c.
References _Unwind_Context::ra, and _Unwind_Context::rp.
| static void _Unwind_SetSignalFrame | ( | struct _Unwind_Context * | context, | |
| int | val | |||
| ) | [inline, static] |
Definition at line 140 of file unwind-dw2.c.
References _Unwind_Context::flags, and SIGNAL_FRAME_BIT.
Referenced by frob_update_context(), and uw_update_context_1().
| static void _Unwind_SetSpColumn | ( | struct _Unwind_Context * | context, | |
| void * | cfa, | |||
| _Unwind_SpTmp * | tmp_sp | |||
| ) | [inline, static] |
Definition at line 1225 of file unwind-dw2.c.
References _Unwind_SetGRPtr(), dwarf_reg_size_table, gcc_assert, _Unwind_SpTmp::ptr, size, and _Unwind_SpTmp::word.
| static void execute_cfa_program | ( | const unsigned char * | insn_ptr, | |
| const unsigned char * | insn_end, | |||
| struct _Unwind_Context * | context, | |||
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 847 of file unwind-dw2.c.
References _Unwind_IsSignalFrame(), alloca, _Unwind_Context::args_size, _Unwind_FrameState::cfa_exp, _Unwind_FrameState::cfa_how, _Unwind_FrameState::cfa_offset, _Unwind_FrameState::cfa_reg, _Unwind_FrameState::code_align, _Unwind_FrameState::data_align, DW_CFA_advance_loc, DW_CFA_advance_loc1, DW_CFA_advance_loc2, DW_CFA_advance_loc4, DW_CFA_def_cfa, DW_CFA_def_cfa_expression, DW_CFA_def_cfa_offset, DW_CFA_def_cfa_offset_sf, DW_CFA_def_cfa_register, DW_CFA_def_cfa_sf, DW_CFA_expression, DW_CFA_GNU_args_size, DW_CFA_GNU_negative_offset_extended, DW_CFA_GNU_window_save, DW_CFA_nop, DW_CFA_offset, DW_CFA_offset_extended, DW_CFA_offset_extended_sf, DW_CFA_register, DW_CFA_remember_state, DW_CFA_restore, DW_CFA_restore_extended, DW_CFA_restore_state, DW_CFA_same_value, DW_CFA_set_loc, DW_CFA_undefined, DW_CFA_val_expression, DW_CFA_val_offset, DW_CFA_val_offset_sf, DWARF_REG_TO_UNWIND_COLUMN, _Unwind_FrameState::fde_encoding, gcc_unreachable, if(), insn, NULL, offset, _Unwind_FrameState::pc, pc, _Unwind_Context::ra, read_1u(), read_2u(), read_4u(), read_encoded_value(), read_sleb128(), read_uleb128(), and _Unwind_FrameState::regs.
| static _Unwind_Word execute_stack_op | ( | const unsigned char * | op_ptr, | |
| const unsigned char * | op_end, | |||
| struct _Unwind_Context * | context, | |||
| _Unwind_Word | initial | |||
| ) | [static] |
Definition at line 433 of file unwind-dw2.c.
References _Unwind_GetGR(), DW_OP_abs, DW_OP_addr, DW_OP_and, DW_OP_bra, DW_OP_breg0, DW_OP_breg1, DW_OP_breg10, DW_OP_breg11, DW_OP_breg12, DW_OP_breg13, DW_OP_breg14, DW_OP_breg15, DW_OP_breg16, DW_OP_breg17, DW_OP_breg18, DW_OP_breg19, DW_OP_breg2, DW_OP_breg20, DW_OP_breg21, DW_OP_breg22, DW_OP_breg23, DW_OP_breg24, DW_OP_breg25, DW_OP_breg26, DW_OP_breg27, DW_OP_breg28, DW_OP_breg29, DW_OP_breg3, DW_OP_breg30, DW_OP_breg31, DW_OP_breg4, DW_OP_breg5, DW_OP_breg6, DW_OP_breg7, DW_OP_breg8, DW_OP_breg9, DW_OP_bregx, DW_OP_const1s, DW_OP_const1u, DW_OP_const2s, DW_OP_const2u, DW_OP_const4s, DW_OP_const4u, DW_OP_const8s, DW_OP_const8u, DW_OP_consts, DW_OP_constu, DW_OP_deref, DW_OP_deref_size, DW_OP_div, DW_OP_drop, DW_OP_dup, DW_OP_eq, DW_OP_ge, DW_OP_gt, DW_OP_le, DW_OP_lit0, DW_OP_lit1, DW_OP_lit10, DW_OP_lit11, DW_OP_lit12, DW_OP_lit13, DW_OP_lit14, DW_OP_lit15, DW_OP_lit16, DW_OP_lit17, DW_OP_lit18, DW_OP_lit19, DW_OP_lit2, DW_OP_lit20, DW_OP_lit21, DW_OP_lit22, DW_OP_lit23, DW_OP_lit24, DW_OP_lit25, DW_OP_lit26, DW_OP_lit27, DW_OP_lit28, DW_OP_lit29, DW_OP_lit3, DW_OP_lit30, DW_OP_lit31, DW_OP_lit4, DW_OP_lit5, DW_OP_lit6, DW_OP_lit7, DW_OP_lit8, DW_OP_lit9, DW_OP_lt, DW_OP_minus, DW_OP_mod, DW_OP_mul, DW_OP_ne, DW_OP_neg, DW_OP_nop, DW_OP_not, DW_OP_or, DW_OP_over, DW_OP_pick, DW_OP_plus, DW_OP_plus_uconst, DW_OP_reg0, DW_OP_reg1, DW_OP_reg10, DW_OP_reg11, DW_OP_reg12, DW_OP_reg13, DW_OP_reg14, DW_OP_reg15, DW_OP_reg16, DW_OP_reg17, DW_OP_reg18, DW_OP_reg19, DW_OP_reg2, DW_OP_reg20, DW_OP_reg21, DW_OP_reg22, DW_OP_reg23, DW_OP_reg24, DW_OP_reg25, DW_OP_reg26, DW_OP_reg27, DW_OP_reg28, DW_OP_reg29, DW_OP_reg3, DW_OP_reg30, DW_OP_reg31, DW_OP_reg4, DW_OP_reg5, DW_OP_reg6, DW_OP_reg7, DW_OP_reg8, DW_OP_reg9, DW_OP_regx, DW_OP_rot, DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_skip, DW_OP_swap, DW_OP_xor, first, gcc_assert, gcc_unreachable, offset, ptr, read_1s(), read_1u(), read_2s(), read_2u(), read_4s(), read_4u(), read_8s(), read_8u(), read_pointer(), read_sleb128(), read_uleb128(), result, second(), stack, t1, t2, and t3.
| static const unsigned char* extract_cie_info | ( | const struct dwarf_cie * | cie, | |
| struct _Unwind_Context * | context, | |||
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 346 of file unwind-dw2.c.
References dwarf_cie::augmentation, _Unwind_FrameState::code_align, _Unwind_FrameState::data_align, DW_EH_PE_omit, _Unwind_FrameState::eh_ptr, _Unwind_FrameState::fde_encoding, _Unwind_FrameState::lsda_encoding, NULL, p, _Unwind_FrameState::personality, read_encoded_value(), read_pointer(), read_sleb128(), read_uleb128(), ret, _Unwind_FrameState::retaddr_column, _Unwind_FrameState::saw_z, _Unwind_FrameState::signal_frame, strlen(), and dwarf_cie::version.
| static int read_1s | ( | const void * | p | ) | [inline, static] |
Definition at line 113 of file unwind-dw2.c.
| static int read_1u | ( | const void * | p | ) | [inline, static] |
Definition at line 110 of file unwind-dw2.c.
| static int read_2s | ( | const void * | p | ) | [inline, static] |
| static int read_2u | ( | const void * | p | ) | [inline, static] |
| static int read_4s | ( | const void * | p | ) | [inline, static] |
| static unsigned int read_4u | ( | const void * | p | ) | [inline, static] |
| static void uw_advance_context | ( | struct _Unwind_Context * | context, | |
| _Unwind_FrameState * | fs | |||
| ) | [static] |
| static _Unwind_Reason_Code uw_frame_state_for | ( | struct _Unwind_Context * | context, | |
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 1093 of file unwind-dw2.c.
References _Unwind_Find_FDE, _Unwind_IsSignalFrame(), _URC_END_OF_STACK, _URC_FATAL_PHASE1_ERROR, _URC_NO_REASON, _Unwind_Context::args_size, _Unwind_Context::bases, DW_EH_PE_omit, end, execute_cfa_program(), extract_cie_info(), _Unwind_FrameState::fde_encoding, dwarf_eh_bases::func, get_cie(), i, insn, _Unwind_Context::lsda, _Unwind_FrameState::lsda_encoding, MD_FALLBACK_FRAME_STATE_FOR, memset, next_fde(), NULL, _Unwind_FrameState::pc, _Unwind_Context::ra, read_encoded_value(), read_uleb128(), _Unwind_FrameState::saw_z, and size_of_encoded_value().
| static _Unwind_Ptr uw_identify_context | ( | struct _Unwind_Context * | context | ) | [inline, static] |
| static void uw_init_context_1 | ( | struct _Unwind_Context * | context, | |
| void * | outer_cfa, | |||
| void * | outer_ra | |||
| ) | [static] |
Definition at line 1399 of file unwind-dw2.c.
References __gthread_once(), __GTHREAD_ONCE_INIT, _Unwind_SetSpColumn(), _URC_NO_REASON, _Unwind_FrameState::cfa_how, _Unwind_FrameState::cfa_offset, _Unwind_FrameState::cfa_reg, dwarf_reg_size_table, EXTENDED_CONTEXT_BIT, _Unwind_Context::flags, gcc_assert, init_dwarf_reg_size_table(), memset, _Unwind_Context::ra, uw_frame_state_for(), and uw_update_context_1().
| static long uw_install_context_1 | ( | struct _Unwind_Context * | current, | |
| struct _Unwind_Context * | target | |||
| ) | [static] |
Definition at line 1455 of file unwind-dw2.c.
References _Unwind_GetGRPtr(), _Unwind_GetPtr(), _Unwind_SetSpColumn(), _Unwind_Context::args_size, _Unwind_Context::by_value, c, _Unwind_Context::cfa, DWARF_FRAME_REGISTERS, dwarf_reg_size_table, gcc_assert, i, memcpy, p, _Unwind_Context::reg, and STACK_GROWS_DOWNWARD.
| static void uw_update_context | ( | struct _Unwind_Context * | context, | |
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 1363 of file unwind-dw2.c.
References _Unwind_GetPtr(), _Unwind_Context::ra, _Unwind_FrameState::retaddr_column, and uw_update_context_1().
| static void uw_update_context_1 | ( | struct _Unwind_Context * | context, | |
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 1241 of file unwind-dw2.c.
References _Unwind_GetGR(), _Unwind_GetGRPtr(), _Unwind_GetPtr(), _Unwind_GRByValue(), _Unwind_SetGRPtr(), _Unwind_SetGRValue(), _Unwind_SetSignalFrame(), _Unwind_SetSpColumn(), _Unwind_Context::cfa, _Unwind_FrameState::cfa_exp, _Unwind_FrameState::cfa_how, _Unwind_FrameState::cfa_offset, _Unwind_FrameState::cfa_reg, DWARF_FRAME_REGISTERS, execute_stack_op(), exp, gcc_unreachable, i, len, MD_FROB_UPDATE_CONTEXT, NULL, read_uleb128(), _Unwind_FrameState::regs, _Unwind_FrameState::signal_frame, and val.
unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS+1] [static] |
Definition at line 86 of file unwind-dw2.c.
1.5.6