diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symfile.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bef88d0..38d1897 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-05-20 Simon Marchi <simon.marchi@efficios.com> + + * symfile.c (reread_symbols): Clear objfile's section_offsets + vector and section indices, re-compute them by calling + sym_offsets. + 2020-05-20 Tom Tromey <tromey@adacore.com> * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove. 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)) |