forked from Imagelibrary/binutils-gdb
gdb: remove symtab::objfile
Same idea as previous patch, but for symtab::objfile. I find it clearer without this wrapper, as it shows that the objfile is common to all symtabs of a given compunit. Otherwise, you could think that each symtab (of a given compunit) can have a specific objfile. Change-Id: Ifc0dbc7ec31a06eefa2787c921196949d5a6fcc6
This commit is contained in:
@@ -7209,7 +7209,7 @@ get_sal_arch (struct symtab_and_line sal)
|
||||
if (sal.section)
|
||||
return sal.section->objfile->arch ();
|
||||
if (sal.symtab)
|
||||
return sal.symtab->objfile ()->arch ();
|
||||
return sal.symtab->compunit ()->objfile ()->arch ();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -9251,8 +9251,9 @@ resolve_sal_pc (struct symtab_and_line *sal)
|
||||
sym = block_linkage_function (b);
|
||||
if (sym != NULL)
|
||||
{
|
||||
fixup_symbol_section (sym, sal->symtab->objfile ());
|
||||
sal->section = sym->obj_section (sal->symtab->objfile ());
|
||||
fixup_symbol_section (sym, sal->symtab->compunit ()->objfile ());
|
||||
sal->section
|
||||
= sym->obj_section (sal->symtab->compunit ()->objfile ());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -14680,7 +14681,7 @@ void
|
||||
breakpoint_free_objfile (struct objfile *objfile)
|
||||
{
|
||||
for (bp_location *loc : all_bp_locations ())
|
||||
if (loc->symtab != NULL && loc->symtab->objfile () == objfile)
|
||||
if (loc->symtab != NULL && loc->symtab->compunit ()->objfile () == objfile)
|
||||
loc->symtab = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user