diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2017-12-08 22:44:11 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-12-08 23:37:30 +0000 |
commit | abccd1e7b7a37385159610ca4e0bc2632a547e9a (patch) | |
tree | 309545b2c8c990f68c311b13b9b729d2d7885391 /gdb/elfread.c | |
parent | 437afbb81e3a04cbd933fc534a50c686eaa63b19 (diff) | |
download | fsf-binutils-gdb-abccd1e7b7a37385159610ca4e0bc2632a547e9a.zip fsf-binutils-gdb-abccd1e7b7a37385159610ca4e0bc2632a547e9a.tar.gz fsf-binutils-gdb-abccd1e7b7a37385159610ca4e0bc2632a547e9a.tar.bz2 |
Change dwarf2_initialize_objfile's return value
dwarf2_initialize_objfile was returning boolean whether it is psymtabs
or .gdb_index while now it needs to return also whether it is
.debug_names.
gdb/ChangeLog
2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
declarations from elfread.c.
(dwarf2_initialize_objfile): Change return value.
* elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
declarations to defs.h.
(elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
* symfile.h (dwarf2_initialize_objfile): Change return type.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index b8881d9..904696f 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -48,10 +48,6 @@ #include "location.h" #include "auxv.h" -/* Forward declarations. */ -extern const struct sym_fns elf_sym_fns_gdb_index; -extern const struct sym_fns elf_sym_fns_lazy_psyms; - /* The struct elfinfo is available only during ELF symbol table and psymtab reading. It is destroyed at the completion of psymtab-reading. It's local to elf_symfile_read. */ @@ -1219,10 +1215,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) information present in OBJFILE. If there is such debug info present never use .gdb_index. */ - if (!objfile_has_partial_symbols (objfile) - && dwarf2_initialize_objfile (objfile)) - objfile_set_sym_fns (objfile, &elf_sym_fns_gdb_index); - else + if (objfile_has_partial_symbols (objfile)) { /* It is ok to do this even if the stabs reader made some partial symbols, because OBJF_PSYMTABS_READ has not been @@ -1230,6 +1223,8 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) when needed. */ objfile_set_sym_fns (objfile, &elf_sym_fns_lazy_psyms); } + else + objfile_set_sym_fns (objfile, &dwarf2_initialize_objfile (objfile)); } /* If the file has its own symbol tables it has no separate debug info. `.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to |