gdb: remove SYMTAB_OBJFILE macro

Remove the macro, replace with an equivalent method.

Change-Id: I8f9ecd290ad28502e53c1ceca5006ba78bf042eb
This commit is contained in:
Simon Marchi
2021-11-20 21:54:11 -05:00
parent 012cfab919
commit 652099717d
16 changed files with 45 additions and 39 deletions

View File

@@ -7194,7 +7194,7 @@ get_sal_arch (struct symtab_and_line sal)
if (sal.section)
return sal.section->objfile->arch ();
if (sal.symtab)
return SYMTAB_OBJFILE (sal.symtab)->arch ();
return sal.symtab->objfile ()->arch ();
return NULL;
}
@@ -9236,8 +9236,8 @@ resolve_sal_pc (struct symtab_and_line *sal)
sym = block_linkage_function (b);
if (sym != NULL)
{
fixup_symbol_section (sym, SYMTAB_OBJFILE (sal->symtab));
sal->section = sym->obj_section (SYMTAB_OBJFILE (sal->symtab));
fixup_symbol_section (sym, sal->symtab->objfile ());
sal->section = sym->obj_section (sal->symtab->objfile ());
}
else
{
@@ -14736,7 +14736,7 @@ void
breakpoint_free_objfile (struct objfile *objfile)
{
for (bp_location *loc : all_bp_locations ())
if (loc->symtab != NULL && SYMTAB_OBJFILE (loc->symtab) == objfile)
if (loc->symtab != NULL && loc->symtab->objfile () == objfile)
loc->symtab = NULL;
}