From 75336a5a2aa345953d0a9de73205457b6d9e27c2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 20 Mar 2021 17:23:40 -0600 Subject: Move psymbol_map out of objfile objfile::psymbol_map is used to implement a Rust feature. It is currently specific to partial symbols -- it isn't used by the DWARF indices. This patch moves it out of objfile and into psymbol_functions, adding a new method to quick_symbol_functions to handle the clearing case. This is needed because the map holds unrelocated addresses. gdb/ChangeLog 2021-03-20 Tom Tromey * quick-symbol.h (struct quick_symbol_functions) : New method. * psymtab.h (struct psymbol_functions) : New method. : Declare method. : New member. * psymtab.c (psymbol_functions::fill_psymbol_map): Rename. (psymbol_functions::find_compunit_symtab_by_address): Update. * objfiles.h (reset_psymtabs): Don't clear psymbol_map. (struct objfile) : Remove. * objfiles.c (objfile_relocate1): Update. --- gdb/objfiles.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/objfiles.c') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index f18f615..bfa5f04 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -703,9 +703,9 @@ objfile_relocate1 (struct objfile *objfile, } } - /* This stores relocated addresses and so must be cleared. This - will cause it to be recreated on demand. */ - objfile->psymbol_map.clear (); + /* Notify the quick symbol object. */ + if (objfile->qf) + objfile->qf->relocated (); /* Relocate isolated symbols. */ { -- cgit v1.1