GDB (xrefs)

Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/dwarf2-frame.c File Reference
`#include "defs.h"`
`#include "dwarf2expr.h"`
`#include "dwarf2.h"`
`#include "frame.h"`
`#include "frame-base.h"`
`#include "frame-unwind.h"`
`#include "gdbcore.h"`
`#include "gdbtypes.h"`
`#include "symtab.h"`
`#include "objfiles.h"`
`#include "regcache.h"`
`#include "value.h"`
`#include "record.h"`
`#include "complaints.h"`
`#include "dwarf2-frame.h"`
`#include "ax.h"`
`#include "dwarf2loc.h"`
`#include "dwarf2-frame-tailcall.h"`

Go to the source code of this file.

## Classes
struct | dwarf2_cie
struct | dwarf2_cie_table
struct | dwarf2_fde
struct | dwarf2_fde_table
struct | comp_unit
class | dwarf_expr_executor
struct | dwarf2_frame_ops
struct | dwarf2_frame_cache

## Macros
#define | cfa_exp_len cfa_reg
#define | DW64_CIE_ID 0xffffffffffffffffULL

## Enumerations
enum | eh_frame_type { EH_CIE_TYPE_ID = 1 << 0, EH_FDE_TYPE_ID = 1 << 1, EH_CIE_OR_FDE_TYPE_ID = EH_CIE_TYPE_ID | EH_FDE_TYPE_ID }

## Functions
static struct dwarf2_fde * | dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
static int | dwarf2_frame_adjust_regnum (struct gdbarch *gdbarch, int regnum, int eh_frame_p)
static CORE_ADDR | read_encoded_value (struct comp_unit *unit, gdb_byte encoding, int ptr_len, const gdb_byte *buf, unsigned int *bytes_read_ptr, CORE_ADDR func_base)
static CORE_ADDR | read_addr_from_reg (struct frame_info *this_frame, int reg)
static void | dwarf2_restore_rule (struct gdbarch *gdbarch, ULONGEST reg_num, struct dwarf2_frame_state *fs, int eh_frame_p)
static CORE_ADDR | execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size, CORE_ADDR offset, struct frame_info *this_frame, CORE_ADDR initial, int initial_in_stack_memory)
static const gdb_byte * | execute_cfa_program (struct dwarf2_fde *fde, const gdb_byte *insn_ptr, const gdb_byte *insn_end, struct gdbarch *gdbarch, CORE_ADDR pc, struct dwarf2_frame_state *fs)
static void | dwarf2_frame_default_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, struct frame_info *this_frame)
static void * | dwarf2_frame_init (struct obstack *obstack)
void | dwarf2_frame_set_init_reg (struct gdbarch *gdbarch, void(*init_reg)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, struct frame_info *))
static void | dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, struct frame_info *this_frame)
void | dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch, int(*signal_frame_p)(struct gdbarch *, struct frame_info *))
static int | dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch, struct frame_info *this_frame)
void | dwarf2_frame_set_adjust_regnum (struct gdbarch *gdbarch, int(*adjust_regnum)(struct gdbarch *, int, int))
static void | dwarf2_frame_find_quirks (struct dwarf2_frame_state *fs, struct dwarf2_fde *fde)
int | dwarf2_fetch_cfa_info (struct gdbarch *gdbarch, CORE_ADDR pc, struct dwarf2_per_cu_data *data, int *regnum_out, LONGEST *offset_out, CORE_ADDR *text_offset_out, const gdb_byte **cfa_start_out, const gdb_byte **cfa_end_out)
static struct dwarf2_frame_cache * | dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
static enum unwind_stop_reason | dwarf2_frame_unwind_stop_reason (struct frame_info *this_frame, void **this_cache)
static void | dwarf2_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | dwarf2_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static void | dwarf2_frame_dealloc_cache (struct frame_info *self, void *this_cache)
static int | dwarf2_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
void | dwarf2_append_unwinders (struct gdbarch *gdbarch)
static CORE_ADDR | dwarf2_frame_base_address (struct frame_info *this_frame, void **this_cache)
const struct frame_base * | dwarf2_frame_base_sniffer (struct frame_info *this_frame)
CORE_ADDR | dwarf2_frame_cfa (struct frame_info *this_frame)
static unsigned int | read_1_byte (bfd *abfd, const gdb_byte *buf)
static unsigned int | read_4_bytes (bfd *abfd, const gdb_byte *buf)
static ULONGEST | read_8_bytes (bfd *abfd, const gdb_byte *buf)
static ULONGEST | read_initial_length (bfd *abfd, const gdb_byte *buf, unsigned int *bytes_read_ptr)
static gdb_byte | encoding_for_size (unsigned int size)
static int | bsearch_cie_cmp (const void *key, const void *element)
static struct dwarf2_cie * | find_cie (struct dwarf2_cie_table *cie_table, ULONGEST cie_pointer)
static void | add_cie (struct dwarf2_cie_table *cie_table, struct dwarf2_cie *cie)
static int | bsearch_fde_cmp (const void *key, const void *element)
static void | add_fde (struct dwarf2_fde_table *fde_table, struct dwarf2_fde *fde)
static const gdb_byte * | decode_frame_entry (struct comp_unit *unit, const gdb_byte *start, int eh_frame_p, struct dwarf2_cie_table *cie_table, struct dwarf2_fde_table *fde_table, enum eh_frame_type entry_type)
static const gdb_byte * | decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, int eh_frame_p, struct dwarf2_cie_table *cie_table, struct dwarf2_fde_table *fde_table, enum eh_frame_type entry_type)
static int | qsort_fde_cmp (const void *a, const void *b)
void | dwarf2_build_frame_info (struct objfile *objfile)
void | _initialize_dwarf2_frame (void)

## Variables
static struct gdbarch_data * | dwarf2_frame_data
static const struct frame_unwind | dwarf2_frame_unwind
static const struct frame_unwind | dwarf2_signal_frame_unwind
static const struct frame_base | dwarf2_frame_base
const struct objfile_data * | dwarf2_frame_objfile_data

## Macro Definition Documentation

## ◆ cfa_exp_len

#define cfa_exp_len cfa_reg

Definition at line 174 of file dwarf2-frame.c.

## ◆ DW64_CIE_ID

#define DW64_CIE_ID 0xffffffffffffffffULL

Definition at line 1752 of file dwarf2-frame.c.

Referenced by decode_frame_entry_1().

## Enumeration Type Documentation

## ◆ eh_frame_type

enum eh_frame_type

Enumerator
EH_CIE_TYPE_ID |
EH_FDE_TYPE_ID |
EH_CIE_OR_FDE_TYPE_ID |

Definition at line 1757 of file dwarf2-frame.c.

## Function Documentation

## ◆ _initialize_dwarf2_frame()

void _initialize_dwarf2_frame | ( | void |  | ) |

Definition at line 2400 of file dwarf2-frame.c.

References dwarf2_frame_data, dwarf2_frame_init(), dwarf2_frame_objfile_data, gdbarch_data_register_pre_init(), and selftests::register_test_foreach_arch().

## ◆ add_cie()

static void add_cie | ( | struct dwarf2_cie_table * | cie_table,
|  | struct dwarf2_cie * | cie
| ) |  |
| static

Definition at line 1662 of file dwarf2-frame.c.

References dwarf2_cie::cie_pointer, dwarf2_cie_table::entries, gdb_assert, dwarf2_cie_table::num_entries, and XRESIZEVEC.

Referenced by decode_frame_entry_1().

## ◆ add_fde()

static void add_fde | ( | struct dwarf2_fde_table * | fde_table,
|  | struct dwarf2_fde * | fde
| ) |  |
| static

Definition at line 1740 of file dwarf2-frame.c.

References dwarf2_fde::address_range, dwarf2_fde_table::entries, dwarf2_fde_table::num_entries, and XRESIZEVEC.

Referenced by decode_frame_entry_1().

## ◆ bsearch_cie_cmp()

static int bsearch_cie_cmp | ( | const void * | key,
|  | const void * | element
| ) |  |
| static

Definition at line 1627 of file dwarf2-frame.c.

References dwarf2_cie::cie_pointer.

Referenced by find_cie().

## ◆ bsearch_fde_cmp()

static int bsearch_fde_cmp | ( | const void * | key,
|  | const void * | element
| ) |  |
| static

Definition at line 1676 of file dwarf2-frame.c.

References dwarf2_fde::address_range, and dwarf2_fde::initial_location.

Referenced by dwarf2_frame_find_fde().

## ◆ decode_frame_entry()

static const gdb_byte * decode_frame_entry | ( | struct comp_unit * | unit,
|  | const gdb_byte * | start,
|  | int | eh_frame_p,
|  | struct dwarf2_cie_table * | cie_table,
|  | struct dwarf2_fde_table * | fde_table,
|  | enum eh_frame_type | entry_type
| ) |  |
| static

Definition at line 2077 of file dwarf2-frame.c.

References _, complaint, decode_frame_entry_1(), comp_unit::dwarf_frame_buffer, comp_unit::dwarf_frame_section, comp_unit::dwarf_frame_size, dwarf2_fde::eh_frame_p, and symfile_complaints.

Referenced by decode_frame_entry_1(), and dwarf2_build_frame_info().

## ◆ decode_frame_entry_1()

static const gdb_byte* decode_frame_entry_1 | ( | struct comp_unit * | unit,
|  | const gdb_byte * | start,
|  | int | eh_frame_p,
|  | struct dwarf2_cie_table * | cie_table,
|  | struct dwarf2_fde_table * | fde_table,
|  | enum eh_frame_type | entry_type
| ) |  |
| static

Definition at line 1775 of file dwarf2-frame.c.

References _, comp_unit::abfd, add_cie(), add_fde(), dwarf2_cie::addr_size, dwarf2_fde::address_range, dwarf2_cie::augmentation, dwarf2_fde::cie, dwarf2_cie::cie_pointer, dwarf2_cie::code_alignment_factor, dwarf2_cie::data_alignment_factor, decode_frame_entry(), DW64_CIE_ID, dwarf2_frame_adjust_regnum(), comp_unit::dwarf_frame_buffer, comp_unit::dwarf_frame_size, EH_CIE_TYPE_ID, EH_FDE_TYPE_ID, dwarf2_fde::eh_frame_p, dwarf2_cie::encoding, dwarf2_cie::end, dwarf2_fde::end, error(), find_cie(), gdb_assert, gdb_read_sleb128(), gdb_read_uleb128(), gdbarch_adjust_dwarf2_addr(), gdbarch_dwarf2_addr_size(), gdbarch_ptr_bit(), get_objfile_arch(), dwarf2_cie::initial_instructions, dwarf2_fde::initial_location, dwarf2_fde::instructions, comp_unit::objfile, dwarf2_cie::ptr_size, read_1_byte(), read_4_bytes(), read_8_bytes(), read_encoded_value(), read_initial_length(), dwarf2_cie::return_address_register, dwarf2_cie::saw_z_augmentation, dwarf2_cie::segment_size, dwarf2_cie::signal_frame, startswith(), TARGET_CHAR_BIT, dwarf2_cie::unit, and dwarf2_cie::version.

Referenced by decode_frame_entry().

## ◆ dwarf2_append_unwinders()

void dwarf2_append_unwinders | ( | struct gdbarch * | gdbarch | ) |

Definition at line 1384 of file dwarf2-frame.c.

References dwarf2_frame_unwind, dwarf2_signal_frame_unwind, dwarf2_tailcall_frame_unwind, and frame_unwind_append_unwinder().

Referenced by aarch64_gdbarch_init(), alpha_dwarf2_init_abi(), arc_gdbarch_init(), arm_gdbarch_init(), bfin_gdbarch_init(), BP_MANIPULATION(), cris_gdbarch_init(), hppabsd_init_abi(), i386_gdbarch_init(), iq2000_gdbarch_init(), m68hc11_gdbarch_init(), m68k_gdbarch_init(), microblaze_gdbarch_init(), mips_gdbarch_init(), mn10300_frame_unwind_init(), msp430_gdbarch_init(), mt_gdbarch_init(), nds32_gdbarch_init(), nios2_gdbarch_init(), or1k_gdbarch_init(), rl78_gdbarch_init(), rs6000_gdbarch_init(), rx_gdbarch_init(), s390_gdbarch_init(), score_gdbarch_init(), sh64_gdbarch_init(), sh_gdbarch_init(), sparc32_linux_init_abi(), sparc64_linux_init_abi(), spu_gdbarch_init(), tic6x_gdbarch_init(), tilegx_gdbarch_init(), v850_gdbarch_init(), xstormy16_gdbarch_init(), and xtensa_gdbarch_init().

## ◆ dwarf2_build_frame_info()

void dwarf2_build_frame_info | ( | struct objfile * | objfile | ) |

Definition at line 2193 of file dwarf2-frame.c.

References _, comp_unit::abfd, dwarf2_fde::address_range, CATCH, comp_unit::dbase, decode_frame_entry(), DWARF2_DEBUG_FRAME, DWARF2_EH_FRAME, dwarf2_frame_objfile_data, dwarf2_get_section_info(), comp_unit::dwarf_frame_buffer, comp_unit::dwarf_frame_section, comp_unit::dwarf_frame_size, EH_CIE_OR_FDE_TYPE_ID, END_CATCH, dwarf2_cie_table::entries, dwarf2_fde_table::entries, dwarf2_fde::initial_location, dwarf2_cie_table::num_entries, dwarf2_fde_table::num_entries, objfile::obfd, comp_unit::objfile, objfile_name(), qsort, qsort_fde_cmp(), RETURN_MASK_ERROR, objfile::separate_debug_objfile_backlink, comp_unit::tbase, TRY, warning(), xfree(), and XRESIZEVEC.

Referenced by coff_symfile_read(), dwarf2_frame_find_fde(), macho_symfile_read(), and xcoff_initial_scan().

## ◆ dwarf2_fetch_cfa_info()

int dwarf2_fetch_cfa_info | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | struct dwarf2_per_cu_data * | data,
|  | int * | regnum_out,
|  | LONGEST * | offset_out,
|  | CORE_ADDR * | text_offset_out,
|  | const gdb_byte ** | cfa_start_out,
|  | const gdb_byte ** | cfa_end_out
| ) |  |

Definition at line 862 of file dwarf2-frame.c.

References _, dwarf2_frame_state::armcc_cfa_offsets_reversed, CFA_EXP, CFA_REG_OFFSET, dwarf2_fde::cie, dwarf2_frame_find_fde(), dwarf2_frame_find_quirks(), dwarf_reg_to_regnum_or_error(), dwarf2_cie::end, dwarf2_fde::end, error(), execute_cfa_program(), dwarf2_cie::initial_instructions, dwarf2_fde::instructions, internal_error(), and regnum.

Referenced by do_compile_dwarf_expr_to_c(), and dwarf2_compile_expr_to_ax().

## ◆ dwarf2_frame_adjust_regnum()

static int dwarf2_frame_adjust_regnum | ( | struct gdbarch * | gdbarch,
|  | int | regnum,
|  | int | eh_frame_p
| ) |  |
| static

Definition at line 814 of file dwarf2-frame.c.

References dwarf2_frame_ops::adjust_regnum, dwarf2_frame_data, and regnum.

Referenced by decode_frame_entry_1(), dwarf2_restore_rule(), and execute_cfa_program().

## ◆ dwarf2_frame_base_address()

static CORE_ADDR dwarf2_frame_base_address | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 1402 of file dwarf2-frame.c.

References dwarf2_frame_cache::cfa, and dwarf2_frame_cache().

## ◆ dwarf2_frame_base_sniffer()

const struct frame_base* dwarf2_frame_base_sniffer | ( | struct frame_info * | this_frame | ) |

Definition at line 1419 of file dwarf2-frame.c.

References dwarf2_frame_base, dwarf2_frame_find_fde(), and get_frame_address_in_block().

Referenced by alpha_dwarf2_init_abi(), microblaze_gdbarch_init(), mips_gdbarch_init(), s390_gdbarch_init(), and score_gdbarch_init().

## ◆ dwarf2_frame_cache()

static struct dwarf2_frame_cache* dwarf2_frame_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 964 of file dwarf2-frame.c.

References _, dwarf2_frame_cache::addr_size, dwarf2_frame_state::armcc_cfa_offsets_reversed, CATCH, dwarf2_frame_cache::cfa, CFA_EXP, CFA_REG_OFFSET, complaint, dwarf2_frame_find_fde(), dwarf2_frame_find_quirks(), dwarf2_frame_init_reg(), DWARF2_FRAME_REG_RA, DWARF2_FRAME_REG_RA_OFFSET, DWARF2_FRAME_REG_SAME_VALUE, DWARF2_FRAME_REG_SAVED_REG, DWARF2_FRAME_REG_UNDEFINED, DWARF2_FRAME_REG_UNSPECIFIED, dwarf_reg_to_regnum(), END_CATCH, dwarf2_frame_cache::entry_cfa_sp_offset, dwarf2_frame_cache::entry_cfa_sp_offset_p, execute_cfa_program(), execute_stack_op(), FRAME_OBSTACK_CALLOC, FRAME_OBSTACK_ZALLOC, gdb_assert, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), gdbarch_sp_regnum(), get_frame_address_in_block(), get_frame_arch(), get_frame_func_if_available(), dwarf2_frame_state_reg::how, internal_error(), dwarf2_frame_state_reg::loc, NOT_AVAILABLE_ERROR, gdbarch::num_regs, paddress(), dwarf2_frame_state::pc, read_addr_from_reg(), dwarf2_frame_state_reg::reg, dwarf2_frame_cache::reg, regnum, dwarf2_frame_state::retaddr_column, dwarf2_frame_cache::retaddr_reg, RETURN_MASK_ERROR, symfile_complaints, dwarf2_frame_cache::text_offset, throw_exception(), TRY, dwarf2_frame_cache::unavailable_retaddr, and dwarf2_frame_cache::undefined_retaddr.

Referenced by dwarf2_frame_base_address(), dwarf2_frame_dealloc_cache(), dwarf2_frame_prev_register(), dwarf2_frame_this_id(), and dwarf2_frame_unwind_stop_reason().

## ◆ dwarf2_frame_cfa()

CORE_ADDR dwarf2_frame_cfa | ( | struct frame_info * | this_frame | ) |

Definition at line 1434 of file dwarf2-frame.c.

References _, FID_STACK_VALID, frame_unwinder_is(), get_frame_base(), get_frame_id(), get_frame_type(), get_frame_unwind_stop_reason(), get_prev_frame(), INLINE_FRAME, NOT_AVAILABLE_ERROR, record_btrace_frame_unwind, record_btrace_tailcall_frame_unwind, and throw_error().

Referenced by dwarf2_tailcall_prev_register_first(), and dwarf_evaluate_loc_desc::get_frame_cfa().

## ◆ dwarf2_frame_dealloc_cache()

static void dwarf2_frame_dealloc_cache | ( | struct frame_info * | self,
|  | void * | this_cache
| ) |  |
| static

Definition at line 1317 of file dwarf2-frame.c.

References frame_unwind::dealloc_cache, dwarf2_frame_cache(), dwarf2_tailcall_frame_unwind, and dwarf2_frame_cache::tailcall_cache.

## ◆ dwarf2_frame_default_init_reg()

static void dwarf2_frame_default_init_reg | ( | struct gdbarch * | gdbarch,
|  | int | regnum,
|  | struct dwarf2_frame_state_reg * | reg,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 691 of file dwarf2-frame.c.

References DWARF2_FRAME_REG_CFA, DWARF2_FRAME_REG_RA, gdbarch_pc_regnum(), gdbarch_sp_regnum(), and regnum.

Referenced by dwarf2_frame_init().

## ◆ dwarf2_frame_find_fde()

static struct dwarf2_fde * dwarf2_frame_find_fde | ( | CORE_ADDR * | pc,
|  | CORE_ADDR * | out_offset
| ) |  |
| static

Definition at line 1692 of file dwarf2-frame.c.

References ALL_OBJFILES, ANOFFSET, bsearch_fde_cmp(), dwarf2_build_frame_info(), dwarf2_frame_objfile_data, dwarf2_fde_table::entries, gdb_assert, dwarf2_fde::initial_location, dwarf2_fde_table::num_entries, objfile::objfile(), offset, SECT_OFF_TEXT, and objfile::section_offsets.

Referenced by dwarf2_fetch_cfa_info(), dwarf2_frame_base_sniffer(), dwarf2_frame_cache(), and dwarf2_frame_sniffer().

## ◆ dwarf2_frame_find_quirks()

static void dwarf2_frame_find_quirks | ( | struct dwarf2_frame_state * | fs,
|  | struct dwarf2_fde * | fde
| ) |  |
| static

Definition at line 826 of file dwarf2-frame.c.

References dwarf2_frame_state::armcc_cfa_offsets_reversed, dwarf2_frame_state::armcc_cfa_offsets_sf, dwarf2_cie::augmentation, dwarf2_fde::cie, COMPUNIT_PRODUCER, find_pc_compunit_symtab(), dwarf2_frame_state::pc, producer_is_realview(), startswith(), and dwarf2_cie::version.

Referenced by dwarf2_fetch_cfa_info(), and dwarf2_frame_cache().

## ◆ dwarf2_frame_init()

static void* dwarf2_frame_init | ( | struct obstack * | obstack | ) |
| static

Definition at line 730 of file dwarf2-frame.c.

References dwarf2_frame_default_init_reg(), dwarf2_frame_ops::init_reg, and OBSTACK_ZALLOC.

Referenced by _initialize_dwarf2_frame().

## ◆ dwarf2_frame_init_reg()

static void dwarf2_frame_init_reg | ( | struct gdbarch * | gdbarch,
|  | int | regnum,
|  | struct dwarf2_frame_state_reg * | reg,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 757 of file dwarf2-frame.c.

References dwarf2_frame_data, dwarf2_frame_ops::init_reg, and regnum.

Referenced by dwarf2_frame_cache().

## ◆ dwarf2_frame_prev_register()

static struct value* dwarf2_frame_prev_register | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | int | regnum
| ) |  |
| static

Definition at line 1209 of file dwarf2-frame.c.

References _, dwarf2_frame_cache::addr_size, dwarf2_frame_cache::cfa, dwarf2_frame_cache::checked_tailcall_bottom, dwarf2_frame_cache(), DWARF2_FRAME_REG_CFA, DWARF2_FRAME_REG_CFA_OFFSET, DWARF2_FRAME_REG_FN, DWARF2_FRAME_REG_RA_OFFSET, DWARF2_FRAME_REG_SAME_VALUE, DWARF2_FRAME_REG_SAVED_EXP, DWARF2_FRAME_REG_SAVED_OFFSET, DWARF2_FRAME_REG_SAVED_REG, DWARF2_FRAME_REG_SAVED_VAL_EXP, DWARF2_FRAME_REG_SAVED_VAL_OFFSET, DWARF2_FRAME_REG_UNDEFINED, DWARF2_FRAME_REG_UNSPECIFIED, dwarf2_tailcall_prev_register_first(), dwarf2_tailcall_sniffer_first(), dwarf_reg_to_regnum_or_error(), dwarf2_frame_cache::entry_cfa_sp_offset, dwarf2_frame_cache::entry_cfa_sp_offset_p, execute_stack_op(), dwarf2_frame_state_reg::exp, dwarf2_frame_state_reg::fn, frame_unwind_got_address(), frame_unwind_got_constant(), frame_unwind_got_memory(), frame_unwind_got_optimized(), frame_unwind_got_register(), get_frame_arch(), get_frame_register_unsigned(), dwarf2_frame_state_reg::how, internal_error(), dwarf2_frame_state_reg::loc, dwarf2_frame_state_reg::offset, dwarf2_frame_state_reg::reg, dwarf2_frame_cache::reg, regnum, dwarf2_frame_cache::retaddr_reg, dwarf2_frame_cache::tailcall_cache, and dwarf2_frame_cache::text_offset.

## ◆ dwarf2_frame_set_adjust_regnum()

void dwarf2_frame_set_adjust_regnum | ( | struct gdbarch * | gdbarch,
|  | int(*)(struct gdbarch *, int, int) | adjust_regnum
| ) |  |

Definition at line 800 of file dwarf2-frame.c.

References dwarf2_frame_ops::adjust_regnum, and dwarf2_frame_data.

Referenced by rs6000_gdbarch_init(), and s390_gdbarch_init().

## ◆ dwarf2_frame_set_init_reg()

void dwarf2_frame_set_init_reg | ( | struct gdbarch * | gdbarch,
|  | void(*)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, struct frame_info *) | init_reg
| ) |  |

Definition at line 743 of file dwarf2-frame.c.

References dwarf2_frame_data, and dwarf2_frame_ops::init_reg.

Referenced by aarch64_gdbarch_init(), arc_gdbarch_init(), arm_gdbarch_init(), cris_gdbarch_init(), hppabsd_init_abi(), rs6000_gdbarch_init(), s390_gdbarch_init(), sh_gdbarch_init(), sparc32_gdbarch_init(), sparc64_init_abi(), and tic6x_gdbarch_init().

## ◆ dwarf2_frame_set_signal_frame_p()

void dwarf2_frame_set_signal_frame_p | ( | struct gdbarch * | gdbarch,
|  | int(*)(struct gdbarch *, struct frame_info *) | signal_frame_p
| ) |  |

Definition at line 771 of file dwarf2-frame.c.

References dwarf2_frame_data, and dwarf2_frame_ops::signal_frame_p.

Referenced by i386_darwin_init_abi(), i386_linux_init_abi(), and x86_darwin_init_abi_64().

## ◆ dwarf2_frame_signal_frame_p()

static int dwarf2_frame_signal_frame_p | ( | struct gdbarch * | gdbarch,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 785 of file dwarf2-frame.c.

References dwarf2_frame_data, and dwarf2_frame_ops::signal_frame_p.

Referenced by dwarf2_frame_sniffer().

## ◆ dwarf2_frame_sniffer()

static int dwarf2_frame_sniffer | ( | const struct frame_unwind * | self,
|  | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 1326 of file dwarf2-frame.c.

References dwarf2_fde::cie, dwarf2_frame_find_fde(), dwarf2_frame_signal_frame_p(), get_frame_address_in_block(), get_frame_arch(), NORMAL_FRAME, dwarf2_cie::signal_frame, and SIGTRAMP_FRAME.

## ◆ dwarf2_frame_this_id()

static void dwarf2_frame_this_id | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | struct frame_id * | this_id
| ) |  |
| static

Definition at line 1194 of file dwarf2-frame.c.

References dwarf2_frame_cache::cfa, dwarf2_frame_cache(), frame_id_build(), frame_id_build_unavailable_stack(), get_frame_func(), dwarf2_frame_cache::unavailable_retaddr, and dwarf2_frame_cache::undefined_retaddr.

## ◆ dwarf2_frame_unwind_stop_reason()

static enum unwind_stop_reason dwarf2_frame_unwind_stop_reason | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 1178 of file dwarf2-frame.c.

References dwarf2_frame_cache(), dwarf2_frame_cache::unavailable_retaddr, and dwarf2_frame_cache::undefined_retaddr.

## ◆ dwarf2_restore_rule()

static void dwarf2_restore_rule | ( | struct gdbarch * | gdbarch,
|  | ULONGEST | reg_num,
|  | struct dwarf2_frame_state * | fs,
|  | int | eh_frame_p
| ) |  |
| static

Definition at line 198 of file dwarf2-frame.c.

References _, complaint, dwarf2_frame_adjust_regnum(), DWARF2_FRAME_REG_UNSPECIFIED, dwarf_reg_to_regnum(), gdb_assert, gdbarch_register_name(), paddress(), dwarf2_frame_state::pc, regnum, and symfile_complaints.

Referenced by execute_cfa_program().

## ◆ encoding_for_size()

static gdb_byte encoding_for_size | ( | unsigned int | size | ) |
| static

Definition at line 1512 of file dwarf2-frame.c.

References _, internal_error(), and size.

Referenced by read_encoded_value().

## ◆ execute_cfa_program()

static const gdb_byte* execute_cfa_program | ( | struct dwarf2_fde * | fde,
|  | const gdb_byte * | insn_ptr,
|  | const gdb_byte * | insn_end,
|  | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | struct dwarf2_frame_state * | fs
| ) |  |
| static

Definition at line 337 of file dwarf2-frame.c.

References _, ANOFFSET, dwarf2_frame_state::armcc_cfa_offsets_sf, gdbarch::byte_order, CFA_EXP, CFA_REG_OFFSET, dwarf2_fde::cie, dwarf2_frame_state::code_align, complaint, dwarf2_frame_state::data_align, dwarf2_frame_adjust_regnum(), DWARF2_FRAME_REG_SAME_VALUE, DWARF2_FRAME_REG_SAVED_EXP, DWARF2_FRAME_REG_SAVED_OFFSET, DWARF2_FRAME_REG_SAVED_REG, DWARF2_FRAME_REG_SAVED_VAL_EXP, DWARF2_FRAME_REG_SAVED_VAL_OFFSET, DWARF2_FRAME_REG_UNDEFINED, dwarf2_frame_state_reg_info::dwarf2_frame_state_reg_info(), dwarf2_restore_rule(), dwarf2_fde::eh_frame_p, dwarf2_cie::encoding, error(), extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_execute_dwarf_cfa_vendor_op(), if(), dwarf2_fde::initial_location, internal_error(), comp_unit::objfile, offset, paddress(), dwarf2_frame_state::pc, dwarf2_cie::ptr_size, read_encoded_value(), dwarf2_frame_state_reg_info::reg, safe_read_sleb128(), safe_read_uleb128(), SECT_OFF_TEXT, objfile::section_offsets, symfile_complaints, and dwarf2_cie::unit.

Referenced by dwarf2_fetch_cfa_info(), and dwarf2_frame_cache().

## ◆ execute_stack_op()

static CORE_ADDR execute_stack_op | ( | const gdb_byte * | exp,
|  | ULONGEST | len,
|  | int | addr_size,
|  | CORE_ADDR | offset,
|  | struct frame_info * | this_frame,
|  | CORE_ADDR | initial,
|  | int | initial_in_stack_memory
| ) |  |
| static

Definition at line 297 of file dwarf2-frame.c.

References _, dwarf_expr_context::addr_size, DWARF_VALUE_MEMORY, DWARF_VALUE_REGISTER, error(), dwarf_expr_context::eval(), dwarf_expr_context::fetch(), dwarf_expr_context::fetch_address(), dwarf_expr_context::gdbarch, get_frame_arch(), dwarf_expr_context::location, offset, dwarf_expr_context::offset, dwarf_expr_context::push_address(), dwarf_expr_executor::read_addr_from_reg(), dwarf_expr_context::ref_addr_size, dwarf_expr_executor::this_frame, and value_as_long().

Referenced by dwarf2_frame_cache(), and dwarf2_frame_prev_register().

## ◆ find_cie()

static struct dwarf2_cie* find_cie | ( | struct dwarf2_cie_table * | cie_table,
|  | ULONGEST | cie_pointer
| ) |  |
| static

Definition at line 1640 of file dwarf2-frame.c.

References bsearch_cie_cmp(), dwarf2_cie::cie_pointer, dwarf2_cie_table::entries, gdb_assert, and dwarf2_cie_table::num_entries.

Referenced by decode_frame_entry_1().

## ◆ qsort_fde_cmp()

static int qsort_fde_cmp | ( | const void * | a,
|  | const void * | b
| ) |  |
| static

Definition at line 2172 of file dwarf2-frame.c.

References dwarf2_fde::address_range, dwarf2_fde::eh_frame_p, and dwarf2_fde::initial_location.

Referenced by dwarf2_build_frame_info().

## ◆ read_1_byte()

static unsigned int read_1_byte | ( | bfd * | abfd,
|  | const gdb_byte * | buf
| ) |  |
| static

Definition at line 1459 of file dwarf2-frame.c.

Referenced by decode_frame_entry_1().

## ◆ read_4_bytes()

static unsigned int read_4_bytes | ( | bfd * | abfd,
|  | const gdb_byte * | buf
| ) |  |
| static

Definition at line 1465 of file dwarf2-frame.c.

Referenced by decode_frame_entry_1().

## ◆ read_8_bytes()

static ULONGEST read_8_bytes | ( | bfd * | abfd,
|  | const gdb_byte * | buf
| ) |  |
| static

Definition at line 1471 of file dwarf2-frame.c.

Referenced by decode_frame_entry_1().

## ◆ read_addr_from_reg()

static CORE_ADDR read_addr_from_reg | ( | struct frame_info * | this_frame,
|  | int | reg
| ) |  |
| static

Definition at line 187 of file dwarf2-frame.c.

References address_from_register(), dwarf_reg_to_regnum_or_error(), get_frame_arch(), and regnum.

Referenced by dwarf2_frame_cache(), and dwarf_expr_executor::read_addr_from_reg().

## ◆ read_encoded_value()

static CORE_ADDR read_encoded_value | ( | struct comp_unit * | unit,
|  | gdb_byte | encoding,
|  | int | ptr_len,
|  | const gdb_byte * | buf,
|  | unsigned int * | bytes_read_ptr,
|  | CORE_ADDR | func_base
| ) |  |
| static

Definition at line 1528 of file dwarf2-frame.c.

References _, comp_unit::abfd, comp_unit::dbase, comp_unit::dwarf_frame_buffer, comp_unit::dwarf_frame_section, encoding_for_size(), internal_error(), offset, safe_read_sleb128(), safe_read_uleb128(), and comp_unit::tbase.

Referenced by decode_frame_entry_1(), and execute_cfa_program().

## ◆ read_initial_length()

static ULONGEST read_initial_length | ( | bfd * | abfd,
|  | const gdb_byte * | buf,
|  | unsigned int * | bytes_read_ptr
| ) |  |
| static

Definition at line 1477 of file dwarf2-frame.c.

Referenced by decode_frame_entry_1().

## Variable Documentation

## ◆ dwarf2_frame_base

const struct frame_base dwarf2_frame_base
| static

Initial value:
=
{
&dwarf2_frame_unwind,
dwarf2_frame_base_address,
dwarf2_frame_base_address,
dwarf2_frame_base_address
}
dwarf2_frame_unwind
static const struct frame_unwind dwarf2_frame_unwind
Definition: dwarf2-frame.c:1357
dwarf2_frame_base_address
static CORE_ADDR dwarf2_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: dwarf2-frame.c:1402

Definition at line 1410 of file dwarf2-frame.c.

Referenced by dwarf2_frame_base_sniffer().

## ◆ dwarf2_frame_data

struct gdbarch_data* dwarf2_frame_data
| static

Definition at line 671 of file dwarf2-frame.c.

Referenced by _initialize_dwarf2_frame(), dwarf2_frame_adjust_regnum(), dwarf2_frame_init_reg(), dwarf2_frame_set_adjust_regnum(), dwarf2_frame_set_init_reg(), dwarf2_frame_set_signal_frame_p(), and dwarf2_frame_signal_frame_p().

## ◆ dwarf2_frame_objfile_data

const struct objfile_data* dwarf2_frame_objfile_data

Definition at line 1456 of file dwarf2-frame.c.

Referenced by _initialize_dwarf2_frame(), dwarf2_build_frame_info(), and dwarf2_frame_find_fde().

## ◆ dwarf2_frame_unwind

const struct frame_unwind dwarf2_frame_unwind
| static

Initial value:
=
{
NORMAL_FRAME,
dwarf2_frame_unwind_stop_reason,
dwarf2_frame_this_id,
dwarf2_frame_prev_register,
NULL,
dwarf2_frame_sniffer,
dwarf2_frame_dealloc_cache
}
dwarf2_frame_this_id
static void dwarf2_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: dwarf2-frame.c:1194
dwarf2_frame_unwind_stop_reason
static enum unwind_stop_reason dwarf2_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: dwarf2-frame.c:1178
NORMAL_FRAME
Definition: frame.h:244
dwarf2_frame_dealloc_cache
static void dwarf2_frame_dealloc_cache(struct frame_info *self, void *this_cache)
Definition: dwarf2-frame.c:1317
dwarf2_frame_sniffer
static int dwarf2_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: dwarf2-frame.c:1326
dwarf2_frame_prev_register
static struct value * dwarf2_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: dwarf2-frame.c:1209

Definition at line 1357 of file dwarf2-frame.c.

Referenced by dwarf2_append_unwinders().

## ◆ dwarf2_signal_frame_unwind

const struct frame_unwind dwarf2_signal_frame_unwind
| static

Initial value:
=
{
SIGTRAMP_FRAME,
dwarf2_frame_unwind_stop_reason,
dwarf2_frame_this_id,
dwarf2_frame_prev_register,
NULL,
dwarf2_frame_sniffer,
NULL
}
dwarf2_frame_this_id
static void dwarf2_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: dwarf2-frame.c:1194
SIGTRAMP_FRAME
Definition: frame.h:255
dwarf2_frame_unwind_stop_reason
static enum unwind_stop_reason dwarf2_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: dwarf2-frame.c:1178
dwarf2_frame_sniffer
static int dwarf2_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: dwarf2-frame.c:1326
dwarf2_frame_prev_register
static struct value * dwarf2_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: dwarf2-frame.c:1209

Definition at line 1368 of file dwarf2-frame.c.

Referenced by dwarf2_append_unwinders().