aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index dd8192a..b02a923 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2543,6 +2543,11 @@ reread_symbols (void)
will need to be called (see discussion below). */
obstack_free (&objfile->objfile_obstack, 0);
objfile->sections = NULL;
+ objfile->section_offsets.clear ();
+ objfile->sect_index_bss = -1;
+ objfile->sect_index_data = -1;
+ objfile->sect_index_rodata = -1;
+ objfile->sect_index_text = -1;
objfile->compunit_symtabs = NULL;
objfile->template_symbols = NULL;
objfile->static_links.reset (nullptr);
@@ -2597,6 +2602,9 @@ reread_symbols (void)
objfiles_changed ();
+ /* Recompute section offsets and section indices. */
+ objfile->sf->sym_offsets (objfile, {});
+
read_symbols (objfile, 0);
if (!objfile_has_symbols (objfile))