aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-20 17:23:40 -0600
committerTom Tromey <tom@tromey.com>2021-03-20 17:23:41 -0600
commita8ad4f3c17727fe2c499a9a8f775ccfe877326ac (patch)
tree848ea6efadcd795524e4bf124c944cff3aa6eb97 /gdb/elfread.c
parent701823751bec1bbf2f1c96463994f894d33d2238 (diff)
downloadgdb-a8ad4f3c17727fe2c499a9a8f775ccfe877326ac.zip
gdb-a8ad4f3c17727fe2c499a9a8f775ccfe877326ac.tar.gz
gdb-a8ad4f3c17727fe2c499a9a8f775ccfe877326ac.tar.bz2
Change objfile_has_partial_symbols to a method
This changes objfile_has_partial_symbols to be a method on objfile. There are some other functions that could benefit from this sort of change, but this was the only one that was relevant to this series. gdb/ChangeLog 2021-03-20 Tom Tromey <tom@tromey.com> * symfile.c (read_symbols): Update. * objfiles.h (struct objfile) <has_partial_symbols>: New method. (objfile_has_partial_symbols): Don't declare. * objfiles.c (objfile::has_partial_symbols): Rename from objfile_has_partial_symbols. (objfile_has_symbols, have_partial_symbols): Update. * elfread.c (elf_symfile_read): Update. * dwarf2/read.c (dwarf2_has_info): Update. * coffread.c (coff_symfile_read): Update.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 8f06c8e..439f5cc 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1266,7 +1266,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
/* elf_sym_fns_gdb_index cannot handle simultaneous non-DWARF
debug information present in OBJFILE. If there is such debug
info present never use an index. */
- if (!objfile_has_partial_symbols (objfile)
+ if (!objfile->has_partial_symbols ()
&& dwarf2_initialize_objfile (objfile, &index_kind))
{
switch (index_kind)
@@ -1293,14 +1293,14 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
SYMTABS/PSYMTABS. `.gnu_debuglink' may no longer be present with
`.note.gnu.build-id'.
- .gnu_debugdata is !objfile_has_partial_symbols because it contains only
+ .gnu_debugdata is !objfile::has_partial_symbols because it contains only
.symtab, not .debug_* section. But if we already added .gnu_debugdata as
an objfile via find_separate_debug_file_in_section there was no separate
debug info available. Therefore do not attempt to search for another one,
objfile->separate_debug_objfile->separate_debug_objfile GDB guarantees to
be NULL and we would possibly violate it. */
- else if (!objfile_has_partial_symbols (objfile)
+ else if (!objfile->has_partial_symbols ()
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{