/* Read AIX xcoff symbol tables and convert to internal format, for GDB.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
Derived from coffread.c, dbxread.c, and a lot of hacking.
Contributed by IBM Corporation.
addr = (int_lnno.l_lnno
? int_lnno.l_addr.l_paddr
: read_symbol_nvalue (int_lnno.l_addr.l_symndx));
- addr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ addr += objfile->section_offsets[SECT_OFF_TEXT (objfile)];
if (addr < startaddr || (endaddr && addr >= endaddr))
return;
}
file_start_addr =
- cs->c_value + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ cs->c_value + objfile->section_offsets[SECT_OFF_TEXT (objfile)];
file_end_addr = file_start_addr + CSECT_LEN (&main_aux);
if (cs->c_name && (cs->c_name[0] == '.' || cs->c_name[0] == '@'))
case C_FCN:
if (strcmp (cs->c_name, ".bf") == 0)
{
- CORE_ADDR off = ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ CORE_ADDR off = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
0, cs->c_naux, &main_aux);
NULL, cstk.start_addr,
(fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
- + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile))));
+ + objfile->section_offsets[SECT_OFF_TEXT (objfile)]));
within_function = 0;
}
break;
depth++;
newobj = push_context (depth,
(cs->c_value
- + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile))));
+ + objfile->section_offsets[SECT_OFF_TEXT (objfile)]));
}
else if (strcmp (cs->c_name, ".eb") == 0)
{
cstk.old_blocks, NULL,
cstk.start_addr,
(cs->c_value
- + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile))));
+ + objfile->section_offsets[SECT_OFF_TEXT (objfile)]));
}
*get_local_symbols () = cstk.locals;
}
else
{
sec = secnum_to_section (cs->c_secnum, objfile);
- off = ANOFFSET (objfile->section_offsets, sec);
+ off = objfile->section_offsets[sec];
}
name = cs->c_name;
will be patched with the type from its stab entry later on in
patch_block_stabs (), unless the file was compiled without -g. */
- SYMBOL_SET_LINKAGE_NAME (sym, SYMNAME_ALLOC (name, symname_alloced));
+ sym->set_linkage_name (SYMNAME_ALLOC (name, symname_alloced));
SYMBOL_TYPE (sym) = objfile_type (objfile)->nodebug_text_symbol;
SYMBOL_ACLASS_INDEX (sym) = LOC_BLOCK;
if (*pp == 'V' && !within_function)
*pp = 'S';
sym = define_symbol ((cs->c_value
- + ANOFFSET (objfile->section_offsets,
- static_block_section)),
+ + objfile->section_offsets[static_block_section]),
cs->c_name, 0, 0, objfile);
if (sym != NULL)
{
us to test whether the associated section exists or not, and then
access it quickly (without searching it again). */
- if (objfile->num_sections == 0)
+ if (objfile->section_offsets.empty ())
return; /* Is that even possible? Better safe than sorry. */
first_section_name = bfd_section_name (objfile->sections[0].the_bfd_section);