diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-27 22:01:10 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | 7b3ecc7555438f05dda657d0ed6a43ee71a3901d (patch) | |
tree | 851e01af89a5dda9ab1ea9c05b4059eda7497907 /gdb/symtab.c | |
parent | 6c9c307c67043b55a209af402246404d89f992c9 (diff) | |
download | binutils-gdb-7b3ecc7555438f05dda657d0ed6a43ee71a3901d.tar.gz |
gdb: remove SYMBOL_OBJFILE_OWNED macro
Add a getter and a setter for whether a symbol is objfile owned. Remove
the corresponding macro and adjust all callers.
Change-Id: Ib7ef3718d65553ae924ca04c3fd478b0f4f3147c
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 5e4a461deb9..8bdc6cab960 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1789,7 +1789,7 @@ fixup_symbol_section (struct symbol *sym, struct objfile *objfile) if (!sym) return NULL; - if (!SYMBOL_OBJFILE_OWNED (sym)) + if (!sym->is_objfile_owned ()) return sym; /* We either have an OBJFILE, or we can get at it from the sym's @@ -6534,7 +6534,7 @@ initialize_ordinary_address_classes (void) struct objfile * symbol_objfile (const struct symbol *symbol) { - gdb_assert (SYMBOL_OBJFILE_OWNED (symbol)); + gdb_assert (symbol->is_objfile_owned ()); return symbol->owner.symtab->objfile (); } @@ -6543,7 +6543,7 @@ symbol_objfile (const struct symbol *symbol) struct gdbarch * symbol_arch (const struct symbol *symbol) { - if (!SYMBOL_OBJFILE_OWNED (symbol)) + if (!symbol->is_objfile_owned ()) return symbol->owner.arch; return symbol->owner.symtab->objfile ()->arch (); } @@ -6553,7 +6553,7 @@ symbol_arch (const struct symbol *symbol) struct symtab * symbol_symtab (const struct symbol *symbol) { - gdb_assert (SYMBOL_OBJFILE_OWNED (symbol)); + gdb_assert (symbol->is_objfile_owned ()); return symbol->owner.symtab; } @@ -6562,7 +6562,7 @@ symbol_symtab (const struct symbol *symbol) void symbol_set_symtab (struct symbol *symbol, struct symtab *symtab) { - gdb_assert (SYMBOL_OBJFILE_OWNED (symbol)); + gdb_assert (symbol->is_objfile_owned ()); symbol->owner.symtab = symtab; } |