/* DWARF 2 debugging format support for GDB.
Copyright (C) 1994-2020 Free Software Foundation, Inc.
+ Copyright (C) 2019-2020 Advanced Micro Devices, Inc. All rights reserved.
Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
Inc. with support from Florida State University (under contract
iter = index->address_table.data ();
end = iter + index->address_table.size ();
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
while (iter < end)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
bfd *abfd = objfile->obfd;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- const CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ const CORE_ADDR baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
auto_obstack temp_obstack;
addrmap *mutable_map = addrmap_create_mutable (&temp_obstack);
if (!objfile->partial_symtabs->psymtabs_addrmap)
return NULL;
- CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ CORE_ADDR baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
data = (struct dwarf2_per_cu_data *) addrmap_find
(objfile->partial_symtabs->psymtabs_addrmap, pc - baseaddr);
if (!data)
/* This must be done before calling dwarf2_build_include_psymtabs. */
pst->dirname = dwarf2_string_attr (comp_unit_die, DW_AT_comp_dir, cu);
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
dwarf2_find_base_address (comp_unit_die, cu);
const char *actual_name = NULL;
CORE_ADDR baseaddr;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
gdb::unique_xmalloc_ptr<char> built_actual_name
= partial_die_full_name (pdi, cu);
CORE_ADDR this_highpc;
CORE_ADDR this_lowpc;
- baseaddr = ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
this_lowpc
= (gdbarch_adjust_dwarf2_addr (gdbarch,
pdi->lowpc + baseaddr)
struct block *static_block;
CORE_ADDR addr;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
/* Clear the list here in case something was left over. */
cu->method_list.clear ();
CORE_ADDR baseaddr;
prepare_one_comp_unit (cu, die, cu->language);
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
get_scope_pc_bounds (die, &lowpc, &highpc, cu);
}
}
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
name = dwarf2_name (die, cu);
struct die_info *child_die;
CORE_ADDR baseaddr;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
/* Ignore blocks with missing or invalid low and high pc attributes. */
/* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges
int nparams;
struct die_info *child_die;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
attr = dwarf2_attr (die, DW_AT_call_return_pc, cu);
if (attr == NULL)
}
buffer = dwarf2_per_objfile->rnglists.buffer + offset;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
while (1)
{
}
buffer = dwarf2_per_objfile->ranges.buffer + offset;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
while (1)
{
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- const CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ const CORE_ADDR baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
int low_set = 0;
CORE_ADDR low = 0;
CORE_ADDR high = 0;
the line number program). */
bool record_lines_p = !decode_for_pst_p;
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
line_ptr = lh->statement_program_start;
line_end = lh->statement_program_end;
list_in_scope = get_builder ()->get_file_symbols ();
- get_builder ()->record_debugformat ("DWARF 2");
+ get_builder ()->record_debugformat (xstrprintf ("DWARF %d", this->header.version));
get_builder ()->record_producer (producer);
processing_has_namespace_info = false;
&dummy));
SYMBOL_ACLASS_INDEX (sym) = LOC_STATIC;
fixup_symbol_section (sym, objfile);
- SET_SYMBOL_VALUE_ADDRESS (sym,
- SYMBOL_VALUE_ADDRESS (sym)
- + ANOFFSET (objfile->section_offsets,
- SYMBOL_SECTION (sym)));
+ SET_SYMBOL_VALUE_ADDRESS
+ (sym,
+ SYMBOL_VALUE_ADDRESS (sym)
+ + objfile->section_offsets[SYMBOL_SECTION (sym)]);
return;
}
int inlined_func = (die->tag == DW_TAG_inlined_subroutine);
- baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
name = dwarf2_name (die, cu);
if (name)
!= dwarf2_per_objfile->abstract_to_concrete.end ()))
{
CORE_ADDR pc = (*get_frame_pc) (baton);
- CORE_ADDR baseaddr
- = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ CORE_ADDR baseaddr = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
struct gdbarch *gdbarch = get_objfile_arch (objfile);
for (const auto &cand_off
{
struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile;
- return ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ return objfile->section_offsets[SECT_OFF_TEXT (objfile)];
}
/* Return a type that is a generic pointer type, the size of which matches