44#include "gdbsupport/gdb_binary_search.h"
46#include "gdbsupport/selftest.h"
49#include <unordered_map>
184 int ptr_len,
const gdb_byte *buf,
185 unsigned int *bytes_read_ptr,
186 unrelocated_addr func_base);
194#define cfa_exp_len cfa_reg
197 : pc (pc_), data_align (
cie->data_alignment_factor),
198 code_align (
cie->code_alignment_factor),
199 retaddr_column (
cie->return_address_register)
212 fs->
regs.alloc_regs (reg + 1);
217 if (reg < fs->initial.reg.size ())
227incomplete CFI data; DW_CFA_restore unspecified\n\
228register %s (#%d) at %s"),
243 value *result_val = ctx.
evaluate (exp, len,
true,
nullptr, this_frame);
256static const gdb_byte *
260 CORE_ADDR text_offset)
263 unsigned int bytes_read;
266 while (insn_ptr < insn_end && fs->pc <= pc)
268 gdb_byte insn = *insn_ptr++;
272 if ((insn & 0xc0) == DW_CFA_advance_loc)
274 else if ((insn & 0xc0) == DW_CFA_offset)
280 fs->
regs.alloc_regs (reg + 1);
282 fs->
regs.reg[reg].loc.offset = offset;
284 else if ((insn & 0xc0) == DW_CFA_restore)
298 fs->
pc += text_offset;
299 insn_ptr += bytes_read;
302 case DW_CFA_advance_loc1:
307 case DW_CFA_advance_loc2:
312 case DW_CFA_advance_loc4:
318 case DW_CFA_offset_extended:
323 fs->
regs.alloc_regs (reg + 1);
325 fs->
regs.reg[reg].loc.offset = offset;
328 case DW_CFA_restore_extended:
333 case DW_CFA_undefined:
336 fs->
regs.alloc_regs (reg + 1);
340 case DW_CFA_same_value:
343 fs->
regs.alloc_regs (reg + 1);
347 case DW_CFA_register:
352 fs->
regs.alloc_regs (reg + 1);
354 fs->
regs.reg[reg].loc.reg = utmp;
357 case DW_CFA_remember_state:
362 fs->
regs.prev = new_rs;
366 case DW_CFA_restore_state:
373bad CFI data; mismatched DW_CFA_restore_state at %s"),
377 fs->
regs = std::move (*old_rs);
389 fs->
regs.cfa_offset = utmp;
393 case DW_CFA_def_cfa_register:
400 case DW_CFA_def_cfa_offset:
406 fs->
regs.cfa_offset = utmp;
413 case DW_CFA_def_cfa_expression:
415 fs->
regs.cfa_exp_len = utmp;
416 fs->
regs.cfa_exp = insn_ptr;
418 insn_ptr += fs->
regs.cfa_exp_len;
421 case DW_CFA_expression:
426 fs->
regs.reg[
reg].loc.exp.start = insn_ptr;
427 fs->
regs.reg[
reg].loc.exp.len = utmp;
432 case DW_CFA_offset_extended_sf:
439 fs->
regs.reg[
reg].loc.offset = offset;
442 case DW_CFA_val_offset:
448 fs->
regs.reg[
reg].loc.offset = offset;
451 case DW_CFA_val_offset_sf:
457 fs->
regs.reg[
reg].loc.offset = offset;
460 case DW_CFA_val_expression:
464 fs->
regs.reg[
reg].loc.exp.start = insn_ptr;
465 fs->
regs.reg[
reg].loc.exp.len = utmp;
470 case DW_CFA_def_cfa_sf:
479 case DW_CFA_def_cfa_offset_sf:
485 case DW_CFA_GNU_args_size:
490 case DW_CFA_GNU_negative_offset_extended:
497 fs->
regs.reg[
reg].loc.offset = -offset;
501 if (insn >= DW_CFA_lo_user && insn <= DW_CFA_hi_user)
505 error (_(
"Call Frame Instruction op %d in vendor extension "
506 "space is not handled on this architecture."),
510 internal_error (_(
"Unknown CFI encountered."));
518 delete fs->
regs.prev;
519 fs->
regs.prev = NULL;
537 memset (&fde, 0,
sizeof fde);
538 memset (&cie, 0,
sizeof cie);
540 cie.data_alignment_factor = -4;
541 cie.code_alignment_factor = 2;
548 DW_CFA_def_cfa, 1, 4,
549 DW_CFA_offset | 0x2, 1,
550 DW_CFA_remember_state,
551 DW_CFA_restore_state,
554 const gdb_byte *insn_end = insns +
sizeof (insns);
558 SELF_CHECK (out == insn_end);
559 SELF_CHECK (fs.pc == 0);
566 SELF_CHECK (fs.regs.reg.size () == (std::max (r1, r2) + 1));
569 SELF_CHECK (fs.regs.reg[r2].loc.offset == -4);
571 for (
auto i = 0; i < fs.regs.reg.size (); i++)
575 SELF_CHECK (fs.regs.cfa_reg == 1);
576 SELF_CHECK (fs.regs.cfa_offset == 4);
578 SELF_CHECK (fs.regs.cfa_exp == NULL);
579 SELF_CHECK (fs.regs.prev == NULL);
617 if (result ==
nullptr)
667 void (*init_reg) (
struct gdbarch *,
int,
733 int regnum,
int eh_frame_p)
781 int *regnum_out, LONGEST *offset_out,
782 CORE_ADDR *text_offset_out,
783 const gdb_byte **cfa_start_out,
784 const gdb_byte **cfa_end_out)
793 error (_(
"Could not compute CFA; needed to translate this expression"));
795 gdb_assert (per_objfile !=
nullptr);
815 switch (fs.
regs.cfa_how)
823 *offset_out = -fs.
regs.cfa_offset;
825 *offset_out = fs.
regs.cfa_offset;
831 *cfa_start_out = fs.
regs.cfa_exp;
832 *cfa_end_out = fs.
regs.cfa_exp + fs.
regs.cfa_exp_len;
836 internal_error (_(
"Unknown CFA rule."));
900 const gdb_byte *instr;
929 gdb_assert (fde != NULL);
955 LONGEST entry_cfa_sp_offset;
956 int entry_cfa_sp_offset_p = 0;
959 && (unrelocated_addr) (entry_pc - text_offset) < fde->
end_addr ())
963 entry_pc, &fs, text_offset);
969 entry_cfa_sp_offset = fs.
regs.cfa_offset;
970 entry_cfa_sp_offset_p = 1;
984 switch (fs.
regs.cfa_how)
989 cache->
cfa -= fs.
regs.cfa_offset;
991 cache->
cfa += fs.
regs.cfa_offset;
1002 internal_error (_(
"Unknown CFA rule."));
1005 catch (
const gdb_exception_error &ex)
1007 if (ex.error == NOT_AVAILABLE_ERROR)
1031 for (column = 0; column < fs.
regs.reg.size (); column++)
1037 if (regnum < 0 || regnum >= num_regs)
1055incomplete CFI data; unspecified registers (e.g., %s) at %s"),
1074 const std::vector<struct dwarf2_frame_state_reg> ®s
1116 (entry_cfa_sp_offset_p
1117 ? &entry_cfa_sp_offset : NULL));
1130 return UNWIND_UNAVAILABLE;
1133 return UNWIND_OUTERMOST;
1135 return UNWIND_NO_REASON;
1153static struct value *
1199 this_frame, cache->
cfa, 1,
1211 this_frame, cache->
cfa, 1,
1246 internal_error (_(
"Unknown register rule."));
1280 gdb_assert (data ==
nullptr);
1419 throw_error (NOT_AVAILABLE_ERROR,
1420 _(
"cfa not available for record btrace target"));
1425 throw_error (NOT_AVAILABLE_ERROR,
1426 _(
"can't compute CFA for this frame: "
1427 "required registers or memory are unavailable"));
1430 throw_error (NOT_AVAILABLE_ERROR,
1431 _(
"can't compute CFA for this frame: "
1432 "frame base not available"));
1469 return DW_EH_PE_udata2;
1471 return DW_EH_PE_udata4;
1473 return DW_EH_PE_udata8;
1475 internal_error (_(
"Unsupported address size"));
1481 int ptr_len,
const gdb_byte *buf,
1482 unsigned int *bytes_read_ptr,
1483 unrelocated_addr func_base)
1490 if (encoding & DW_EH_PE_indirect)
1491 internal_error (_(
"Unsupported encoding: DW_EH_PE_indirect"));
1493 *bytes_read_ptr = 0;
1495 switch (encoding & 0x70)
1497 case DW_EH_PE_absptr:
1500 case DW_EH_PE_pcrel:
1504 case DW_EH_PE_datarel:
1507 case DW_EH_PE_textrel:
1510 case DW_EH_PE_funcrel:
1511 base = (ULONGEST) func_base;
1513 case DW_EH_PE_aligned:
1516 if ((offset % ptr_len) != 0)
1518 *bytes_read_ptr = ptr_len - (offset % ptr_len);
1519 buf += *bytes_read_ptr;
1523 internal_error (_(
"Invalid or unsupported encoding"));
1526 if ((encoding & 0x07) == 0x00)
1529 if (bfd_get_sign_extend_vma (unit->
abfd))
1530 encoding |= DW_EH_PE_signed;
1533 switch (encoding & 0x0f)
1535 case DW_EH_PE_uleb128:
1538 const gdb_byte *end_buf = buf + (
sizeof (
value) + 1) * 8 / 7;
1541 return base +
value;
1543 case DW_EH_PE_udata2:
1544 *bytes_read_ptr += 2;
1545 return (base + bfd_get_16 (unit->
abfd, (bfd_byte *) buf));
1546 case DW_EH_PE_udata4:
1547 *bytes_read_ptr += 4;
1548 return (base + bfd_get_32 (unit->
abfd, (bfd_byte *) buf));
1549 case DW_EH_PE_udata8:
1550 *bytes_read_ptr += 8;
1551 return (base + bfd_get_64 (unit->
abfd, (bfd_byte *) buf));
1552 case DW_EH_PE_sleb128:
1555 const gdb_byte *end_buf = buf + (
sizeof (
value) + 1) * 8 / 7;
1558 return base +
value;
1560 case DW_EH_PE_sdata2:
1561 *bytes_read_ptr += 2;
1562 return (base + bfd_get_signed_16 (unit->
abfd, (bfd_byte *) buf));
1563 case DW_EH_PE_sdata4:
1564 *bytes_read_ptr += 4;
1565 return (base + bfd_get_signed_32 (unit->
abfd, (bfd_byte *) buf));
1566 case DW_EH_PE_sdata8:
1567 *bytes_read_ptr += 8;
1568 return (base + bfd_get_signed_64 (unit->
abfd, (bfd_byte *) buf));
1570 internal_error (_(
"Invalid or unsupported encoding"));
1580 if (iter != cie_table.end ())
1581 return iter->second;
1639 gdb_assert (unit != NULL);
1642 if (fde_table->empty ())
1648 gdb_assert (!fde_table->empty ());
1649 unrelocated_addr seek_pc = (unrelocated_addr) (*pc - offset);
1650 if (seek_pc < (*fde_table)[0]->initial_location)
1653 auto it = gdb::binary_search (fde_table->begin (), fde_table->end (),
1655 if (it != fde_table->end ())
1657 *pc = (CORE_ADDR) (*it)->initial_location + offset;
1658 if (out_per_objfile !=
nullptr)
1675 fde_table->push_back (fde);
1678#define DW64_CIE_ID 0xffffffffffffffffULL
1692 const gdb_byte *start,
1701static const gdb_byte *
1703 struct comp_unit *unit,
const gdb_byte *start,
1709 const gdb_byte *buf, *
end;
1711 unsigned int bytes_read;
1714 ULONGEST cie_pointer;
1721 end = buf + (size_t) length;
1731 dwarf64_p = (bytes_read == 12);
1752 if (cie_pointer == cie_id)
1757 unsigned int cie_version;
1761 error (_(
"Found a CIE when not expecting it."));
1784 if (cie_version != 1 && cie_version != 3 && cie_version != 4)
1840 if (cie_version == 1)
1861 uint64_t uleb_length;
1891 gdb_byte
encoding = (*buf++) & ~DW_EH_PE_indirect;
1893 buf, &bytes_read, (unrelocated_addr) 0);
1932 error (_(
"Found an FDE when not expecting it."));
1941 cie_pointer -= (dwarf64_p ? 8 : 4);
1950 if (fde->
cie == NULL)
1959 gdb_assert (fde->
cie != NULL);
1963 buf, &bytes_read, (unrelocated_addr) 0);
1971 (unrelocated_addr) 0);
1982 uint64_t uleb_length;
2006static const gdb_byte *
2008 struct comp_unit *unit,
const gdb_byte *start,
2014 enum {
NONE, ALIGN4, ALIGN8, FAIL } workaround =
NONE;
2015 const gdb_byte *ret;
2016 ptrdiff_t start_offset;
2021 cie_table, fde_table, entry_type);
2051 if (workaround < ALIGN4 && (start_offset & 3) != 0)
2053 start += 4 - (start_offset & 3);
2054 workaround = ALIGN4;
2057 if (workaround < ALIGN8 && (start_offset & 7) != 0)
2059 start += 8 - (start_offset & 7);
2060 workaround = ALIGN8;
2079Corrupt data in %s:%s; align 4 workaround apparently succeeded"),
2086Corrupt data in %s:%s; align 8 workaround apparently succeeded"),
2122 const gdb_byte *frame_ptr;
2129 auto unit = gdb::make_unique<comp_unit> (
objfile);
2136 &unit->dwarf_frame_section,
2137 &unit->dwarf_frame_buffer,
2138 &unit->dwarf_frame_size);
2139 if (unit->dwarf_frame_size)
2141 asection *got, *txt;
2147 got = bfd_get_section_by_name (unit->abfd,
".got");
2149 unit->dbase = got->vma;
2153 txt = bfd_get_section_by_name (unit->abfd,
".text");
2155 unit->tbase = txt->vma;
2159 frame_ptr = unit->dwarf_frame_buffer;
2160 while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
2163 cie_table, &fde_table,
2167 catch (
const gdb_exception_error &e)
2169 warning (_(
"skipping .eh_frame info of %s: %s"),
2181 &unit->dwarf_frame_section,
2182 &unit->dwarf_frame_buffer,
2183 &unit->dwarf_frame_size);
2184 if (unit->dwarf_frame_size)
2186 size_t num_old_fde_entries = fde_table.size ();
2190 frame_ptr = unit->dwarf_frame_buffer;
2191 while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
2193 cie_table, &fde_table,
2196 catch (
const gdb_exception_error &e)
2198 warning (_(
"skipping .debug_frame info of %s: %s"),
2201 fde_table.resize (num_old_fde_entries);
2206 struct dwarf2_fde *first_non_zero_fde = NULL;
2225 if (fde->initial_location != (unrelocated_addr) 0)
2227 first_non_zero_fde = fde;
2237 if (fde->initial_location == (unrelocated_addr) 0
2238 && first_non_zero_fde != NULL
2242 if (fde_prev != NULL
2246 unit->fde_table.push_back (fde);
2249 unit->fde_table.shrink_to_fit ();
2262 _(
"The DWARF stack unwinders are currently %s.\n"),
2272Set whether the DWARF stack frame unwinders are used."), _(
"\
2273Show whether the DWARF stack frame unwinders are used."), _(
"\
2274When enabled the DWARF stack frame unwinders can be used for architectures\n\
2275that support the DWARF unwinders. Enabling the DWARF unwinders for an\n\
2276architecture that doesn't support them will have no effect."),
2284 selftests::execute_cfa_program_test);
constexpr string_view get()
void set(unsigned key, void *datum)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
#define complaint(FMT,...)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
static struct dwarf2_cie * find_cie(const dwarf2_cie_table &cie_table, ULONGEST cie_pointer)
static void dwarf2_frame_dealloc_cache(frame_info *self, void *this_cache)
static gdb_byte encoding_for_size(unsigned int size)
static void add_fde(dwarf2_fde_table *fde_table, struct dwarf2_fde *fde)
static void dwarf2_frame_default_init_reg(struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, frame_info_ptr this_frame)
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, CORE_ADDR text_offset)
static enum unwind_stop_reason dwarf2_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
static const struct frame_base dwarf2_frame_base
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 const gdb_byte * decode_frame_entry_1(struct gdbarch *gdbarch, struct comp_unit *unit, const gdb_byte *start, int eh_frame_p, dwarf2_cie_table &cie_table, dwarf2_fde_table *fde_table, enum eh_frame_type entry_type)
static int dwarf2_frame_adjust_regnum(struct gdbarch *gdbarch, int regnum, int eh_frame_p)
void * dwarf2_frame_allocate_fn_data(frame_info_ptr this_frame, void **this_cache, fn_prev_register cookie, unsigned long size)
static struct dwarf2_frame_cache * dwarf2_frame_cache(frame_info_ptr this_frame, void **this_cache)
void dwarf2_build_frame_info(struct objfile *objfile)
static int dwarf2_frame_signal_frame_p(struct gdbarch *gdbarch, frame_info_ptr this_frame)
static void dwarf2_frame_find_quirks(struct dwarf2_frame_state *fs, struct dwarf2_fde *fde)
void dwarf2_frame_set_adjust_regnum(struct gdbarch *gdbarch, int(*adjust_regnum)(struct gdbarch *, int, int))
static void dwarf2_restore_rule(struct gdbarch *gdbarch, ULONGEST reg_num, struct dwarf2_frame_state *fs, int eh_frame_p)
static const registry< gdbarch >::key< dwarf2_frame_ops > dwarf2_frame_data
static const struct frame_unwind dwarf2_frame_unwind
static CORE_ADDR execute_stack_op(const gdb_byte *exp, ULONGEST len, int addr_size, frame_info_ptr this_frame, CORE_ADDR initial, int initial_in_stack_memory, dwarf2_per_objfile *per_objfile)
static struct value * dwarf2_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static const registry< bfd >::key< comp_unit > dwarf2_frame_bfd_data
static comp_unit * find_comp_unit(struct objfile *objfile)
std::vector< dwarf2_fde * > dwarf2_fde_table
static const struct frame_unwind dwarf2_signal_frame_unwind
void * dwarf2_frame_get_fn_data(frame_info_ptr this_frame, void **this_cache, fn_prev_register cookie)
static CORE_ADDR dwarf2_frame_base_address(frame_info_ptr this_frame, void **this_cache)
bool dwarf2_frame_unwinders_enabled_p
static const gdb_byte * decode_frame_entry(struct gdbarch *gdbarch, struct comp_unit *unit, const gdb_byte *start, int eh_frame_p, dwarf2_cie_table &cie_table, dwarf2_fde_table *fde_table, enum eh_frame_type entry_type)
static dwarf2_frame_ops * get_frame_ops(struct gdbarch *gdbarch)
static const registry< objfile >::key< comp_unit > dwarf2_frame_objfile_data
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
void _initialize_dwarf2_frame()
const struct frame_base * dwarf2_frame_base_sniffer(frame_info_ptr this_frame)
static void dwarf2_frame_init_reg(struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, frame_info_ptr this_frame)
CORE_ADDR dwarf2_frame_cfa(frame_info_ptr this_frame)
std::unordered_map< ULONGEST, dwarf2_cie * > dwarf2_cie_table
static int bsearch_fde_cmp(const dwarf2_fde *fde, unrelocated_addr seek_pc)
static void set_comp_unit(struct objfile *objfile, struct comp_unit *unit)
static void dwarf2_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static int dwarf2_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_cache)
static bool fde_is_less_than(const dwarf2_fde *aa, const dwarf2_fde *bb)
static void show_dwarf_unwinders_enabled_p(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static struct dwarf2_fde * dwarf2_frame_find_fde(CORE_ADDR *pc, dwarf2_per_objfile **out_per_objfile)
void dwarf2_frame_set_init_reg(struct gdbarch *gdbarch, void(*init_reg)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, frame_info_ptr))
static ULONGEST read_encoded_value(struct comp_unit *unit, gdb_byte encoding, int ptr_len, const gdb_byte *buf, unsigned int *bytes_read_ptr, unrelocated_addr func_base)
void dwarf2_frame_set_signal_frame_p(struct gdbarch *gdbarch, int(*signal_frame_p)(struct gdbarch *, frame_info_ptr))
struct value *(* fn_prev_register)(frame_info_ptr this_frame, void **this_cache, int regnum)
@ DWARF2_FRAME_REG_UNSPECIFIED
@ DWARF2_FRAME_REG_SAVED_VAL_OFFSET
@ DWARF2_FRAME_REG_SAVED_REG
@ DWARF2_FRAME_REG_SAVED_EXP
@ DWARF2_FRAME_REG_RA_OFFSET
@ DWARF2_FRAME_REG_SAVED_VAL_EXP
@ DWARF2_FRAME_REG_CFA_OFFSET
@ DWARF2_FRAME_REG_SAVED_OFFSET
@ DWARF2_FRAME_REG_SAME_VALUE
@ DWARF2_FRAME_REG_UNDEFINED
const gdb_byte * safe_read_sleb128(const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r)
CORE_ADDR read_addr_from_reg(frame_info_ptr frame, int reg)
const gdb_byte * safe_read_uleb128(const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r)
static const gdb_byte * gdb_read_uleb128(const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r)
static const gdb_byte * gdb_read_sleb128(const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r)
const struct frame_unwind dwarf2_tailcall_frame_unwind
void dwarf2_tailcall_sniffer_first(frame_info_ptr this_frame, void **tailcall_cachep, const LONGEST *entry_cfa_sp_offsetp)
struct value * dwarf2_tailcall_prev_register_first(frame_info_ptr this_frame, void **tailcall_cachep, int regnum)
struct value * frame_unwind_got_memory(frame_info_ptr frame, int regnum, CORE_ADDR addr)
struct value * frame_unwind_got_optimized(frame_info_ptr frame, int regnum)
struct value * frame_unwind_got_register(frame_info_ptr frame, int regnum, int new_regnum)
struct value * frame_unwind_got_address(frame_info_ptr frame, int regnum, CORE_ADDR addr)
struct value * frame_unwind_got_constant(frame_info_ptr frame, int regnum, ULONGEST val)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
enum unwind_stop_reason get_frame_unwind_stop_reason(frame_info_ptr frame)
ULONGEST get_frame_register_unsigned(frame_info_ptr frame, int regnum)
bool get_frame_func_if_available(frame_info_ptr this_frame, CORE_ADDR *pc)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
enum frame_type get_frame_type(frame_info_ptr frame)
bool frame_unwinder_is(frame_info_ptr fi, const frame_unwind *unwinder)
struct frame_id frame_id_build_unavailable_stack(CORE_ADDR code_addr)
void * frame_obstack_zalloc(unsigned long size)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
CORE_ADDR get_frame_address_in_block(frame_info_ptr this_frame)
struct frame_id get_frame_id(frame_info_ptr fi)
frame_info_ptr get_prev_frame(frame_info_ptr this_frame)
CORE_ADDR get_frame_base(frame_info_ptr fi)
#define FRAME_OBSTACK_CALLOC(NUMBER, TYPE)
#define FRAME_OBSTACK_ZALLOC(TYPE)
int gdb_bfd_requires_relocations(bfd *abfd)
int gdbarch_pc_regnum(struct gdbarch *gdbarch)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
int gdbarch_dwarf2_addr_size(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_adjust_dwarf2_addr(struct gdbarch *gdbarch, CORE_ADDR pc)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
bool gdbarch_execute_dwarf_cfa_vendor_op(struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs)
static int gdbarch_num_cooked_regs(gdbarch *arch)
LONGEST read_initial_length(bfd *abfd, const gdb_byte *buf, unsigned int *bytes_read, bool handle_nonstd)
static unsigned int read_4_bytes(bfd *abfd, const gdb_byte *buf)
static unsigned int read_1_byte(bfd *abfd, const gdb_byte *buf)
static ULONGEST read_8_bytes(bfd *abfd, const gdb_byte *buf)
int dwarf_reg_to_regnum(struct gdbarch *arch, int dwarf_reg)
int dwarf_reg_to_regnum_or_error(struct gdbarch *arch, ULONGEST dwarf_reg)
void register_test_foreach_arch(const std::string &name, self_test_foreach_arch_function *function)
const char * objfile_name(const struct objfile *objfile)
struct program_space * current_program_space
struct cmd_list_element * set_dwarf_cmdlist
struct cmd_list_element * show_dwarf_cmdlist
void dwarf2_get_section_info(struct objfile *objfile, enum dwarf2_section_enum sect, asection **sectp, const gdb_byte **bufp, bfd_size_type *sizep)
dwarf2_per_objfile * get_dwarf2_per_objfile(struct objfile *objfile)
const struct frame_unwind record_btrace_frame_unwind
const struct frame_unwind record_btrace_tailcall_frame_unwind
comp_unit(struct objfile *objf)
dwarf2_fde_table fde_table
const gdb_byte * dwarf_frame_buffer
bfd_size_type dwarf_frame_size
asection * dwarf_frame_section
const char * producer() const
unsigned char signal_frame
unsigned char saw_z_augmentation
const char * augmentation
ULONGEST return_address_register
const gdb_byte * initial_instructions
unsigned char segment_size
LONGEST data_alignment_factor
ULONGEST code_alignment_factor
unrelocated_addr end_addr() const
unrelocated_addr initial_location
const gdb_byte * instructions
struct dwarf2_frame_fn_data * fn_data
struct dwarf2_frame_state_reg retaddr_reg
dwarf2_per_objfile * per_objfile
struct dwarf2_frame_state_reg * reg
struct dwarf2_frame_fn_data * next
int(* adjust_regnum)(struct gdbarch *, int, int)
int(* signal_frame_p)(struct gdbarch *, frame_info_ptr)
void(* init_reg)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, frame_info_ptr)
dwarf2_frame_state_reg_info()=default
std::vector< struct dwarf2_frame_state_reg > reg
union dwarf2_frame_state_reg::@46 loc
struct dwarf2_frame_state_reg::@46::@47 exp
enum dwarf2_frame_reg_rule how
const ULONGEST code_align
const ULONGEST retaddr_column
bool armcc_cfa_offsets_reversed
dwarf2_frame_state(CORE_ADDR pc, struct dwarf2_cie *cie)
bool armcc_cfa_offsets_sf
void push_address(CORE_ADDR value, bool in_stack_memory)
value * evaluate(const gdb_byte *addr, size_t len, bool as_lval, dwarf2_per_cu_data *per_cu, frame_info_ptr frame, const struct property_addr_info *addr_info=nullptr, struct type *type=nullptr, struct type *subobj_type=nullptr, LONGEST subobj_offset=0)
frame_dealloc_cache_ftype * dealloc_cache
struct objfile * separate_debug_objfile_backlink
struct gdbarch * arch() const
CORE_ADDR text_section_offset() const
::section_offsets section_offsets
objfiles_range objfiles()
enum lval_type lval() const
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)
bool producer_is_realview(const char *producer)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)
CORE_ADDR value_as_address(struct value *val)