44#include "gdbsupport/gdb_binary_search.h"
46#include "gdbsupport/selftest.h"
49#include <unordered_map>
177 int ptr_len,
const gdb_byte *buf,
178 unsigned int *bytes_read_ptr,
179 CORE_ADDR func_base);
187#define cfa_exp_len cfa_reg
190 : pc (pc_), data_align (
cie->data_alignment_factor),
191 code_align (
cie->code_alignment_factor),
192 retaddr_column (
cie->return_address_register)
205 fs->
regs.alloc_regs (reg + 1);
210 if (reg < fs->initial.reg.size ())
220incomplete CFI data; DW_CFA_restore unspecified\n\
221register %s (#%d) at %s"),
236 value *result_val = ctx.
evaluate (exp, len,
true,
nullptr, this_frame);
249static const gdb_byte *
253 CORE_ADDR text_offset)
256 unsigned int bytes_read;
259 while (insn_ptr < insn_end && fs->pc <= pc)
261 gdb_byte insn = *insn_ptr++;
265 if ((insn & 0xc0) == DW_CFA_advance_loc)
267 else if ((insn & 0xc0) == DW_CFA_offset)
273 fs->
regs.alloc_regs (reg + 1);
275 fs->
regs.reg[reg].loc.offset = offset;
277 else if ((insn & 0xc0) == DW_CFA_restore)
291 fs->
pc += text_offset;
292 insn_ptr += bytes_read;
295 case DW_CFA_advance_loc1:
300 case DW_CFA_advance_loc2:
305 case DW_CFA_advance_loc4:
311 case DW_CFA_offset_extended:
316 fs->
regs.alloc_regs (reg + 1);
318 fs->
regs.reg[reg].loc.offset = offset;
321 case DW_CFA_restore_extended:
326 case DW_CFA_undefined:
329 fs->
regs.alloc_regs (reg + 1);
333 case DW_CFA_same_value:
336 fs->
regs.alloc_regs (reg + 1);
340 case DW_CFA_register:
345 fs->
regs.alloc_regs (reg + 1);
347 fs->
regs.reg[reg].loc.reg = utmp;
350 case DW_CFA_remember_state:
355 fs->
regs.prev = new_rs;
359 case DW_CFA_restore_state:
366bad CFI data; mismatched DW_CFA_restore_state at %s"),
370 fs->
regs = std::move (*old_rs);
382 fs->
regs.cfa_offset = utmp;
386 case DW_CFA_def_cfa_register:
393 case DW_CFA_def_cfa_offset:
399 fs->
regs.cfa_offset = utmp;
406 case DW_CFA_def_cfa_expression:
408 fs->
regs.cfa_exp_len = utmp;
409 fs->
regs.cfa_exp = insn_ptr;
411 insn_ptr += fs->
regs.cfa_exp_len;
414 case DW_CFA_expression:
419 fs->
regs.reg[
reg].loc.exp.start = insn_ptr;
420 fs->
regs.reg[
reg].loc.exp.len = utmp;
425 case DW_CFA_offset_extended_sf:
432 fs->
regs.reg[
reg].loc.offset = offset;
435 case DW_CFA_val_offset:
441 fs->
regs.reg[
reg].loc.offset = offset;
444 case DW_CFA_val_offset_sf:
450 fs->
regs.reg[
reg].loc.offset = offset;
453 case DW_CFA_val_expression:
457 fs->
regs.reg[
reg].loc.exp.start = insn_ptr;
458 fs->
regs.reg[
reg].loc.exp.len = utmp;
463 case DW_CFA_def_cfa_sf:
472 case DW_CFA_def_cfa_offset_sf:
478 case DW_CFA_GNU_args_size:
483 case DW_CFA_GNU_negative_offset_extended:
490 fs->
regs.reg[
reg].loc.offset = -offset;
494 if (insn >= DW_CFA_lo_user && insn <= DW_CFA_hi_user)
498 error (_(
"Call Frame Instruction op %d in vendor extension "
499 "space is not handled on this architecture."),
503 internal_error (_(
"Unknown CFI encountered."));
511 delete fs->
regs.prev;
512 fs->
regs.prev = NULL;
530 memset (&fde, 0,
sizeof fde);
531 memset (&cie, 0,
sizeof cie);
533 cie.data_alignment_factor = -4;
534 cie.code_alignment_factor = 2;
541 DW_CFA_def_cfa, 1, 4,
542 DW_CFA_offset | 0x2, 1,
543 DW_CFA_remember_state,
544 DW_CFA_restore_state,
547 const gdb_byte *insn_end = insns +
sizeof (insns);
551 SELF_CHECK (out == insn_end);
552 SELF_CHECK (fs.pc == 0);
559 SELF_CHECK (fs.regs.reg.size () == (std::max (r1, r2) + 1));
562 SELF_CHECK (fs.regs.reg[r2].loc.offset == -4);
564 for (
auto i = 0; i < fs.regs.reg.size (); i++)
568 SELF_CHECK (fs.regs.cfa_reg == 1);
569 SELF_CHECK (fs.regs.cfa_offset == 4);
571 SELF_CHECK (fs.regs.cfa_exp == NULL);
572 SELF_CHECK (fs.regs.prev == NULL);
610 if (result ==
nullptr)
660 void (*init_reg) (
struct gdbarch *,
int,
726 int regnum,
int eh_frame_p)
774 int *regnum_out, LONGEST *offset_out,
775 CORE_ADDR *text_offset_out,
776 const gdb_byte **cfa_start_out,
777 const gdb_byte **cfa_end_out)
786 error (_(
"Could not compute CFA; needed to translate this expression"));
788 gdb_assert (per_objfile !=
nullptr);
808 switch (fs.
regs.cfa_how)
816 *offset_out = -fs.
regs.cfa_offset;
818 *offset_out = fs.
regs.cfa_offset;
824 *cfa_start_out = fs.
regs.cfa_exp;
825 *cfa_end_out = fs.
regs.cfa_exp + fs.
regs.cfa_exp_len;
829 internal_error (_(
"Unknown CFA rule."));
893 const gdb_byte *instr;
922 gdb_assert (fde != NULL);
946 LONGEST entry_cfa_sp_offset;
947 int entry_cfa_sp_offset_p = 0;
961 entry_cfa_sp_offset = fs.
regs.cfa_offset;
962 entry_cfa_sp_offset_p = 1;
976 switch (fs.
regs.cfa_how)
981 cache->
cfa -= fs.
regs.cfa_offset;
983 cache->
cfa += fs.
regs.cfa_offset;
994 internal_error (_(
"Unknown CFA rule."));
997 catch (
const gdb_exception_error &ex)
999 if (ex.error == NOT_AVAILABLE_ERROR)
1023 for (column = 0; column < fs.
regs.reg.size (); column++)
1029 if (regnum < 0 || regnum >= num_regs)
1047incomplete CFI data; unspecified registers (e.g., %s) at %s"),
1066 const std::vector<struct dwarf2_frame_state_reg> ®s
1108 (entry_cfa_sp_offset_p
1109 ? &entry_cfa_sp_offset : NULL));
1122 return UNWIND_UNAVAILABLE;
1125 return UNWIND_OUTERMOST;
1127 return UNWIND_NO_REASON;
1145static struct value *
1191 this_frame, cache->
cfa, 1,
1203 this_frame, cache->
cfa, 1,
1238 internal_error (_(
"Unknown register rule."));
1272 gdb_assert (data ==
nullptr);
1411 throw_error (NOT_AVAILABLE_ERROR,
1412 _(
"cfa not available for record btrace target"));
1417 throw_error (NOT_AVAILABLE_ERROR,
1418 _(
"can't compute CFA for this frame: "
1419 "required registers or memory are unavailable"));
1422 throw_error (NOT_AVAILABLE_ERROR,
1423 _(
"can't compute CFA for this frame: "
1424 "frame base not available"));
1461 return DW_EH_PE_udata2;
1463 return DW_EH_PE_udata4;
1465 return DW_EH_PE_udata8;
1467 internal_error (_(
"Unsupported address size"));
1473 int ptr_len,
const gdb_byte *buf,
1474 unsigned int *bytes_read_ptr,
1475 CORE_ADDR func_base)
1482 if (encoding & DW_EH_PE_indirect)
1483 internal_error (_(
"Unsupported encoding: DW_EH_PE_indirect"));
1485 *bytes_read_ptr = 0;
1487 switch (encoding & 0x70)
1489 case DW_EH_PE_absptr:
1492 case DW_EH_PE_pcrel:
1496 case DW_EH_PE_datarel:
1499 case DW_EH_PE_textrel:
1502 case DW_EH_PE_funcrel:
1505 case DW_EH_PE_aligned:
1508 if ((offset % ptr_len) != 0)
1510 *bytes_read_ptr = ptr_len - (offset % ptr_len);
1511 buf += *bytes_read_ptr;
1515 internal_error (_(
"Invalid or unsupported encoding"));
1518 if ((encoding & 0x07) == 0x00)
1521 if (bfd_get_sign_extend_vma (unit->
abfd))
1522 encoding |= DW_EH_PE_signed;
1525 switch (encoding & 0x0f)
1527 case DW_EH_PE_uleb128:
1530 const gdb_byte *end_buf = buf + (
sizeof (
value) + 1) * 8 / 7;
1533 return base +
value;
1535 case DW_EH_PE_udata2:
1536 *bytes_read_ptr += 2;
1537 return (base + bfd_get_16 (unit->
abfd, (bfd_byte *) buf));
1538 case DW_EH_PE_udata4:
1539 *bytes_read_ptr += 4;
1540 return (base + bfd_get_32 (unit->
abfd, (bfd_byte *) buf));
1541 case DW_EH_PE_udata8:
1542 *bytes_read_ptr += 8;
1543 return (base + bfd_get_64 (unit->
abfd, (bfd_byte *) buf));
1544 case DW_EH_PE_sleb128:
1547 const gdb_byte *end_buf = buf + (
sizeof (
value) + 1) * 8 / 7;
1550 return base +
value;
1552 case DW_EH_PE_sdata2:
1553 *bytes_read_ptr += 2;
1554 return (base + bfd_get_signed_16 (unit->
abfd, (bfd_byte *) buf));
1555 case DW_EH_PE_sdata4:
1556 *bytes_read_ptr += 4;
1557 return (base + bfd_get_signed_32 (unit->
abfd, (bfd_byte *) buf));
1558 case DW_EH_PE_sdata8:
1559 *bytes_read_ptr += 8;
1560 return (base + bfd_get_signed_64 (unit->
abfd, (bfd_byte *) buf));
1562 internal_error (_(
"Invalid or unsupported encoding"));
1572 if (iter != cie_table.end ())
1573 return iter->second;
1632 gdb_assert (unit != NULL);
1635 if (fde_table->empty ())
1641 gdb_assert (!fde_table->empty ());
1645 seek_pc = *pc - offset;
1646 auto it = gdb::binary_search (fde_table->begin (), fde_table->end (),
1648 if (it != fde_table->end ())
1650 *pc = (*it)->initial_location + offset;
1651 if (out_per_objfile !=
nullptr)
1668 fde_table->push_back (fde);
1671#define DW64_CIE_ID 0xffffffffffffffffULL
1685 const gdb_byte *start,
1694static const gdb_byte *
1696 struct comp_unit *unit,
const gdb_byte *start,
1702 const gdb_byte *buf, *
end;
1704 unsigned int bytes_read;
1707 ULONGEST cie_pointer;
1714 end = buf + (size_t) length;
1724 dwarf64_p = (bytes_read == 12);
1745 if (cie_pointer == cie_id)
1750 unsigned int cie_version;
1754 error (_(
"Found a CIE when not expecting it."));
1777 if (cie_version != 1 && cie_version != 3 && cie_version != 4)
1833 if (cie_version == 1)
1854 uint64_t uleb_length;
1884 gdb_byte
encoding = (*buf++) & ~DW_EH_PE_indirect;
1886 buf, &bytes_read, 0);
1926 error (_(
"Found an FDE when not expecting it."));
1935 cie_pointer -= (dwarf64_p ? 8 : 4);
1944 if (fde->
cie == NULL)
1953 gdb_assert (fde->
cie != NULL);
1956 buf, &bytes_read, 0);
1973 uint64_t uleb_length;
1997static const gdb_byte *
1999 struct comp_unit *unit,
const gdb_byte *start,
2005 enum {
NONE, ALIGN4, ALIGN8, FAIL } workaround =
NONE;
2006 const gdb_byte *ret;
2007 ptrdiff_t start_offset;
2012 cie_table, fde_table, entry_type);
2042 if (workaround < ALIGN4 && (start_offset & 3) != 0)
2044 start += 4 - (start_offset & 3);
2045 workaround = ALIGN4;
2048 if (workaround < ALIGN8 && (start_offset & 7) != 0)
2050 start += 8 - (start_offset & 7);
2051 workaround = ALIGN8;
2070Corrupt data in %s:%s; align 4 workaround apparently succeeded"),
2077Corrupt data in %s:%s; align 8 workaround apparently succeeded"),
2113 const gdb_byte *frame_ptr;
2127 &unit->dwarf_frame_section,
2128 &unit->dwarf_frame_buffer,
2129 &unit->dwarf_frame_size);
2130 if (unit->dwarf_frame_size)
2132 asection *got, *txt;
2138 got = bfd_get_section_by_name (unit->abfd,
".got");
2140 unit->dbase = got->vma;
2144 txt = bfd_get_section_by_name (unit->abfd,
".text");
2146 unit->tbase = txt->vma;
2150 frame_ptr = unit->dwarf_frame_buffer;
2151 while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
2154 cie_table, &fde_table,
2158 catch (
const gdb_exception_error &e)
2160 warning (_(
"skipping .eh_frame info of %s: %s"),
2172 &unit->dwarf_frame_section,
2173 &unit->dwarf_frame_buffer,
2174 &unit->dwarf_frame_size);
2175 if (unit->dwarf_frame_size)
2177 size_t num_old_fde_entries = fde_table.size ();
2181 frame_ptr = unit->dwarf_frame_buffer;
2182 while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
2184 cie_table, &fde_table,
2187 catch (
const gdb_exception_error &e)
2189 warning (_(
"skipping .debug_frame info of %s: %s"),
2192 fde_table.resize (num_old_fde_entries);
2197 struct dwarf2_fde *first_non_zero_fde = NULL;
2216 if (fde->initial_location != 0)
2218 first_non_zero_fde = fde;
2228 if (fde->initial_location == 0
2229 && first_non_zero_fde != NULL
2231 < fde->initial_location + fde->address_range))
2234 if (fde_prev != NULL
2238 unit->fde_table.push_back (fde);
2241 unit->fde_table.shrink_to_fit ();
2254 _(
"The DWARF stack unwinders are currently %s.\n"),
2264Set whether the DWARF stack frame unwinders are used."), _(
"\
2265Show whether the DWARF stack frame unwinders are used."), _(
"\
2266When enabled the DWARF stack frame unwinders can be used for architectures\n\
2267that support the DWARF unwinders. Enabling the DWARF unwinders for an\n\
2268architecture that doesn't support them will have no effect."),
2276 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 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 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)
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 int bsearch_fde_cmp(const dwarf2_fde *fde, CORE_ADDR seek_pc)
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 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))
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
ULONGEST return_address_register
const gdb_byte * initial_instructions
unsigned char segment_size
LONGEST data_alignment_factor
ULONGEST code_alignment_factor
const gdb_byte * instructions
CORE_ADDR initial_location
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
struct dwarf2_frame_state_reg::@42::@43 exp
enum dwarf2_frame_reg_rule how
union dwarf2_frame_state_reg::@42 loc
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()
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)
CORE_ADDR value_address(const struct value *value)