aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-04-17 19:44:20 -0600
committerTom Tromey <tom@tromey.com>2022-04-20 09:28:16 -0600
commite19b2d94653dd4a7523a9e9b62020a63dac39439 (patch)
tree19d21478ff945ffc1308932bac7bc9e9370f4fb2 /gdb/symtab.c
parentf66b5363431ccf23debbdfacb63c09c2c57b6ada (diff)
downloadgdb-e19b2d94653dd4a7523a9e9b62020a63dac39439.zip
gdb-e19b2d94653dd4a7523a9e9b62020a63dac39439.tar.gz
gdb-e19b2d94653dd4a7523a9e9b62020a63dac39439.tar.bz2
Replace symbol_objfile with symbol::objfile
This turns symbol_objfile into a method on symbol.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 43a64ed..7188169 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1806,7 +1806,7 @@ fixup_symbol_section (struct symbol *sym, struct objfile *objfile)
gdb_assert (objfile || symbol_symtab (sym));
if (objfile == NULL)
- objfile = symbol_objfile (sym);
+ objfile = sym->objfile ();
if (sym->obj_section (objfile) != nullptr)
return sym;
@@ -3780,7 +3780,7 @@ find_function_start_sal (symbol *sym, bool funfirstline)
fixup_symbol_section (sym, NULL);
symtab_and_line sal
= find_function_start_sal_1 (BLOCK_ENTRY_PC (sym->value_block ()),
- sym->obj_section (symbol_objfile (sym)),
+ sym->obj_section (sym->objfile ()),
funfirstline);
sal.symbol = sym;
return sal;
@@ -3907,7 +3907,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
{
fixup_symbol_section (sym, NULL);
- objfile = symbol_objfile (sym);
+ objfile = sym->objfile ();
pc = BLOCK_ENTRY_PC (sym->value_block ());
section = sym->obj_section (objfile);
name = sym->linkage_name ();
@@ -5789,7 +5789,7 @@ find_gnu_ifunc (const symbol *sym)
lookup_name_info lookup_name (sym->search_name (),
symbol_name_match_type::SEARCH_NAME);
- struct objfile *objfile = symbol_objfile (sym);
+ struct objfile *objfile = sym->objfile ();
CORE_ADDR address = BLOCK_ENTRY_PC (sym->value_block ());
minimal_symbol *ifunc = NULL;
@@ -6593,10 +6593,10 @@ initialize_ordinary_address_classes (void)
/* See symtab.h. */
struct objfile *
-symbol_objfile (const struct symbol *symbol)
+symbol::objfile () const
{
- gdb_assert (symbol->is_objfile_owned ());
- return symbol->owner.symtab->compunit ()->objfile ();
+ gdb_assert (is_objfile_owned ());
+ return owner.symtab->compunit ()->objfile ();
}
/* See symtab.h. */