aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-10 16:23:52 -0600
committerTom Tromey <tom@tromey.com>2019-01-10 07:08:13 -0700
commit6d6a12bf87bc6dd89b2533b5d0490fdcc00df9ad (patch)
tree9dad6a22fbcbad4d8b43503d3a59caac5fdf480b /gdb/objfiles.h
parentd320c2b5e181828418224521f2acd2ff48e127f4 (diff)
downloadfsf-binutils-gdb-6d6a12bf87bc6dd89b2533b5d0490fdcc00df9ad.zip
fsf-binutils-gdb-6d6a12bf87bc6dd89b2533b5d0490fdcc00df9ad.tar.gz
fsf-binutils-gdb-6d6a12bf87bc6dd89b2533b5d0490fdcc00df9ad.tar.bz2
Introduce objfile::reset_psymtabs
This introduces a new method, objfile::reset_psymtabs, and changes reread_symbols to use it. This method simply destroys the existing partial symbols and recreates the psymtab_storage object. This patch fixes a latent bug -- namely, that reread_symbols should clear objfile::psymbol_map, but does not. I can submit that separately if you'd prefer. gdb/ChangeLog 2019-01-10 Tom Tromey <tom@tromey.com> * symfile.c (reread_symbols): Call objfile->reset_psymtabs. * objfiles.h (objfile::reset_psymtabs): New method.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 94b415c..cde025d 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -293,6 +293,15 @@ struct objfile
DISABLE_COPY_AND_ASSIGN (objfile);
+ /* Reset the storage for the partial symbol tables. */
+
+ void reset_psymtabs ()
+ {
+ psymbol_map.clear ();
+ partial_symtabs.reset (new psymtab_storage (this));
+ }
+
+
/* All struct objfile's are chained together by their next pointers.
The program space field "objfiles" (frequently referenced via
the macro "object_files") points to the first link in this chain. */