struct mapped_index *index)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
const gdb_byte *iter, *end;
struct addrmap *mutable_map;
CORE_ADDR baseaddr;
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
bfd *abfd = objfile->obfd;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
const CORE_ADDR baseaddr = objfile->text_section_offset ();
auto_obstack temp_obstack;
if (warn_if_readin && data->v.quick->compunit_symtab)
warning (_("(Internal error: pc %s in read in CU, but not in symtab.)"),
- paddress (get_objfile_arch (objfile), pc));
+ paddress (objfile->arch (), pc));
result
= recursively_find_pc_sect_compunit_symtab (dw2_instantiate_symtab (data,
section->read (objfile);
- map.dwarf5_byte_order = gdbarch_byte_order (get_objfile_arch (objfile));
+ map.dwarf5_byte_order = gdbarch_byte_order (objfile->arch ());
const gdb_byte *addr = section->buffer;
{
struct dwarf2_cu *cu = reader->cu;
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct dwarf2_per_cu_data *per_cu = cu->per_cu;
CORE_ADDR baseaddr;
CORE_ADDR best_lowpc = 0, best_highpc = 0;
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
CORE_ADDR addr = 0;
const char *actual_name = NULL;
CORE_ADDR baseaddr;
if (set_addrmap)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
CORE_ADDR baseaddr;
CORE_ADDR this_highpc;
CORE_ADDR this_lowpc;
struct dwarf2_cu *cu = per_cu->cu;
struct dwarf2_per_objfile *dwarf2_per_objfile = per_cu->dwarf2_per_objfile;
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
CORE_ADDR lowpc, highpc;
struct compunit_symtab *cust;
CORE_ADDR baseaddr;
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
CORE_ADDR lowpc = ((CORE_ADDR) -1);
CORE_ADDR highpc = ((CORE_ADDR) 0);
struct attribute *attr;
read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct context_stack *newobj;
CORE_ADDR lowpc;
CORE_ADDR highpc;
read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
CORE_ADDR lowpc, highpc;
struct die_info *child_die;
CORE_ADDR baseaddr;
read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
CORE_ADDR pc, baseaddr;
struct attribute *attr;
struct call_site *call_site, call_site_local;
dwarf2_psymtab *ranges_pst)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
const CORE_ADDR baseaddr = objfile->text_section_offset ();
int low_set = 0;
CORE_ADDR low = 0;
CORE_ADDR baseaddr, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct attribute *attr;
struct attribute *attr_high;
struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct nextfield *new_field;
struct attribute *attr;
struct field *fp;
struct dwarf2_locexpr_baton *baton;
gdb_byte *ptr;
unsigned int cu_off;
- enum bfd_endian byte_order = gdbarch_byte_order (get_objfile_arch (objfile));
+ enum bfd_endian byte_order = gdbarch_byte_order (objfile->arch ());
LONGEST offset = 0;
gdb_assert (common_loc && member_loc);
read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct gdbarch *gdbarch
- = get_objfile_arch (cu->per_cu->dwarf2_per_objfile->objfile);
+ = cu->per_cu->dwarf2_per_objfile->objfile->arch ();
struct comp_unit_head *cu_header = &cu->header;
struct type *type;
struct attribute *attr_byte_size;
read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr;
struct dynamic_prop prop;
dwarf2_init_float_type (struct objfile *objfile, int bits, const char *name,
const char *name_hint, enum bfd_endian byte_order)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
const struct floatformat **format;
struct type *type;
int bits, const char *name_hint,
enum bfd_endian byte_order)
{
- gdbarch *gdbarch = get_objfile_arch (objfile);
+ gdbarch *gdbarch = objfile->arch ();
struct type *tt = nullptr;
/* Try to find a suitable floating point builtin type of size BITS.
if (!name)
complaint (_("DW_AT_name missing from DW_TAG_base_type"));
- arch = get_objfile_arch (objfile);
+ arch = objfile->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (arch);
attr = dwarf2_attr (die, DW_AT_endianity, cu);
if (lowpc == 0 && !dwarf2_per_objfile->has_section_at_zero)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
complaint (_("DW_AT_low_pc %s is zero "
"for DIE at %s [in module %s]"),
else if (lowpc >= highpc)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
complaint (_("DW_AT_low_pc %s is not < DW_AT_high_pc %s "
"for DIE at %s [in module %s]"),
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
bfd *abfd = reader->abfd;
struct comp_unit_head *cu_header = &cu->header;
unsigned int bytes_read;
info_ptr += bytes_read;
break;
case DW_FORM_addr:
- DW_ADDR (attr) = cu->header.read_address (abfd, info_ptr, &bytes_read);
- DW_ADDR (attr) = gdbarch_adjust_dwarf2_addr (gdbarch, DW_ADDR (attr));
- info_ptr += bytes_read;
+ {
+ struct gdbarch *gdbarch = objfile->arch ();
+ DW_ADDR (attr) = cu->header.read_address (abfd, info_ptr, &bytes_read);
+ DW_ADDR (attr) = gdbarch_adjust_dwarf2_addr (gdbarch, DW_ADDR (attr));
+ info_ptr += bytes_read;
+ }
break;
case DW_FORM_block2:
blk = dwarf_alloc_block (cu);
CORE_ADDR baseaddr;
struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile;
bfd *abfd = objfile->obfd;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
/* True if we're recording line info (as opposed to building partial
symtabs and just interested in finding include files mentioned by
the line number program). */
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct symbol *sym = NULL;
const char *name;
struct attribute *attr = NULL;
{
CORE_ADDR pc = (*get_frame_pc) (baton);
CORE_ADDR baseaddr = objfile->text_section_offset ();
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
for (const auto &cand_off
: dwarf2_per_objfile->abstract_to_concrete[die->sect_off])