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

Go to the source code of this file.
| #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER |
Definition at line 43 of file unwind-dw2.c.
| #define MD_FROB_UPDATE_CONTEXT | ( | CTX, | |||
| FS | ) | do { } while (0) |
| #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS |
Definition at line 48 of file unwind-dw2.c.
| #define STACK_GROWS_DOWNWARD 0 |
Definition at line 34 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 1297 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 1341 of file unwind-dw2.c.
| struct frame_state * __frame_state_for | ( | void * | pc_target, | |
| struct frame_state * | state_in | |||
| ) | [read] |
Definition at line 1042 of file unwind-dw2.c.
References _URC_NO_REASON, _Unwind_Context::args_size, frame_state::args_size, frame_state::cfa_offset, frame_state::cfa_reg, frame_state::eh_ptr, end, memset, PRE_GCC3_DWARF_FRAME_REGISTERS, _Unwind_Context::ra, frame_state::reg_or_offset, frame_state::retaddr_column, frame_state::saved, and uw_frame_state_for().
Definition at line 219 of file unwind-dw2.c.
References _Unwind_Find_FDE, dwarf_eh_bases::func, and NULL.
| _Unwind_Word _Unwind_GetCFA | ( | struct _Unwind_Context * | context | ) |
| _Unwind_Ptr _Unwind_GetDataRelBase | ( | struct _Unwind_Context * | context | ) |
| _Unwind_Word _Unwind_GetGR | ( | struct _Unwind_Context * | context, | |
| int | index | |||
| ) | [inline] |
| _Unwind_Ptr _Unwind_GetIP | ( | struct _Unwind_Context * | context | ) | [inline] |
| void* _Unwind_GetLanguageSpecificData | ( | struct _Unwind_Context * | context | ) |
| _Unwind_Ptr _Unwind_GetRegionStart | ( | struct _Unwind_Context * | context | ) |
Definition at line 213 of file unwind-dw2.c.
References _Unwind_Context::bases, and dwarf_eh_bases::func.
| _Unwind_Ptr _Unwind_GetTextRelBase | ( | struct _Unwind_Context * | context | ) |
| void _Unwind_SetGR | ( | struct _Unwind_Context * | context, | |
| int | index, | |||
| _Unwind_Word | val | |||
| ) | [inline] |
| void _Unwind_SetIP | ( | struct _Unwind_Context * | context, | |
| _Unwind_Ptr | val | |||
| ) | [inline] |
| 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 725 of file unwind-dw2.c.
References abort, _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, _Unwind_FrameState::fde_encoding, if(), insn, NULL, offset, _Unwind_FrameState::pc, read_1u(), read_2u(), read_4u(), read_encoded_value(), read_sleb128(), read_uleb128(), and _Unwind_FrameState::regs.
Referenced by uw_frame_state_for().
| 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 323 of file unwind-dw2.c.
References _Unwind_GetGR(), abort, 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_xor, first, 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.
Referenced by uw_update_context_1().
| static const unsigned char* extract_cie_info | ( | struct dwarf_cie * | cie, | |
| struct _Unwind_Context * | context, | |||
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 248 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, and strlen().
Referenced by uw_frame_state_for().
Definition at line 1351 of file unwind-dw2.c.
References dwarf_reg_size_table.
Referenced by uw_init_context_1(), and uw_install_context_1().
| static int read_1s | ( | const void * | p | ) | [inline, static] |
| static int read_1u | ( | const void * | p | ) | [inline, static] |
Definition at line 142 of file unwind-dw2.c.
Referenced by execute_cfa_program(), and execute_stack_op().
| static int read_2s | ( | const void * | p | ) | [inline, static] |
| static int read_2u | ( | const void * | p | ) | [inline, static] |
Definition at line 148 of file unwind-dw2.c.
References up.
Referenced by execute_cfa_program(), and execute_stack_op().
| static int read_4s | ( | const void * | p | ) | [inline, static] |
| static unsigned int read_4u | ( | const void * | p | ) | [inline, static] |
Definition at line 154 of file unwind-dw2.c.
References up.
Referenced by execute_cfa_program(), and execute_stack_op().
Definition at line 139 of file unwind-dw2.c.
References unaligned::p, and up.
Referenced by execute_stack_op(), and extract_cie_info().
| static _Unwind_Reason_Code uw_frame_state_for | ( | struct _Unwind_Context * | context, | |
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 927 of file unwind-dw2.c.
References _Unwind_Find_FDE, _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 1308 of file unwind-dw2.c.
References _URC_NO_REASON, abort, _Unwind_FrameState::cfa_how, _Unwind_FrameState::cfa_offset, _Unwind_FrameState::cfa_reg, memset, _Unwind_Context::ra, _Unwind_Context::reg, 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 1357 of file unwind-dw2.c.
References __gthread_once(), __GTHREAD_ONCE_INIT, _Unwind_GetGR(), _Unwind_Context::args_size, c, _Unwind_Context::cfa, DWARF_FRAME_REGISTERS, dwarf_reg_size_table, i, init_dwarf_reg_size_table(), memcpy, _Unwind_Context::reg, and STACK_GROWS_DOWNWARD.
| static void uw_update_context | ( | struct _Unwind_Context * | context, | |
| _Unwind_FrameState * | fs | |||
| ) | [static] |
Definition at line 1284 of file unwind-dw2.c.
References _Unwind_GetGR(), _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 1190 of file unwind-dw2.c.
References _Unwind_GetGR(), abort, _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, i, len, MD_FROB_UPDATE_CONTEXT, NULL, read_uleb128(), _Unwind_Context::reg, _Unwind_FrameState::regs, and val.
Referenced by uw_init_context_1(), and uw_update_context().
unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS] [static] |
Definition at line 70 of file unwind-dw2.c.
Referenced by _Unwind_GetGR(), _Unwind_SetGR(), _Unwind_SetGRValue(), _Unwind_SetSpColumn(), init_dwarf_reg_size_table(), uw_init_context_1(), and uw_install_context_1().
1.5.6