summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2017-12-08 22:44:11 +0000
committerPedro Alves <palves@redhat.com>2017-12-08 23:37:30 +0000
commitabccd1e7b7a37385159610ca4e0bc2632a547e9a (patch)
tree309545b2c8c990f68c311b13b9b729d2d7885391 /gdb/dwarf2read.c
parent437afbb81e3a04cbd933fc534a50c686eaa63b19 (diff)
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/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a9daf1f3bc..798af72830 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -5291,7 +5291,7 @@ const struct quick_symbol_functions dwarf2_gdb_index_functions =
/* Initialize for reading DWARF for this objfile. Return 0 if this
file will use psymtabs, or 1 if using the GNU index. */
-int
+const sym_fns &
dwarf2_initialize_objfile (struct objfile *objfile)
{
/* If we're about to read full symbols, don't bother with the
@@ -5320,13 +5320,13 @@ dwarf2_initialize_objfile (struct objfile *objfile)
/* Return 1 so that gdb sees the "quick" functions. However,
these functions will be no-ops because we will have expanded
all symtabs. */
- return 1;
+ return elf_sym_fns_gdb_index;
}
if (dwarf2_read_index (objfile))
- return 1;
+ return elf_sym_fns_gdb_index;
- return 0;
+ return elf_sym_fns_lazy_psyms;
}