aboutsummaryrefslogtreecommitdiff
path: root/gdb/ctfread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-10-23 09:50:58 -0600
committerTom Tromey <tom@tromey.com>2020-01-26 16:40:21 -0700
commit128a391fe45a234587dc585e03a7726cd6ee0255 (patch)
tree138e6a68a6da90b5aefea011f0e7c113b721fe56 /gdb/ctfread.c
parent0494dbecdfa0b0b9065393755a1ac64431997da1 (diff)
downloadfsf-binutils-gdb-128a391fe45a234587dc585e03a7726cd6ee0255.zip
fsf-binutils-gdb-128a391fe45a234587dc585e03a7726cd6ee0255.tar.gz
fsf-binutils-gdb-128a391fe45a234587dc585e03a7726cd6ee0255.tar.bz2
Virtualize "readin" and "compunit_symtab"
This patch removes the "readin" and "compunit_symtab" members from partial_symtab, replacing them with methods. Then it introduces a new "standard_psymtab" class, which restores these members; and changes the symbol readers to use this intermediate class as the base class of their partial symtab subclasses. The reason for this is to make it possible for a symbol reader to implement an alternate mapping between partial and full symbol tables. This is important in order to be able to share psymtabs across objfiles -- whether a psymtab has been "readin" is objfile-dependent, as are the pointers to the full symbol tables. gdb/ChangeLog 2020-01-26 Tom Tromey <tom@tromey.com> * psymtab.c (partial_map_expand_apply) (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol) (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab) (psym_print_stats, psym_expand_symtabs_for_function) (psym_map_symbol_filenames, psym_map_matching_symbols) (psym_expand_symtabs_matching) (partial_symtab::read_dependencies, maintenance_info_psymtabs) (maintenance_check_psymtabs): Use new methods. * psympriv.h (struct partial_symtab) <readin_p, get_compunit_symtab>: New methods. <readin, compunit_symtab>: Remove members. (struct standard_psymtab): New. (struct legacy_psymtab): Derive from standard_psymtab. * dwarf2read.h (struct dwarf2_psymtab): Derive from standard_psymtab. * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab. Change-Id: Idb923f196d7e03bf7cb9cfc8134ed06dd3f211ce
Diffstat (limited to 'gdb/ctfread.c')
-rw-r--r--gdb/ctfread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ctfread.c b/gdb/ctfread.c
index 77cdcd4..d363ce6 100644
--- a/gdb/ctfread.c
+++ b/gdb/ctfread.c
@@ -116,10 +116,10 @@ struct ctf_context
};
/* A partial symtab, specialized for this module. */
-struct ctf_psymtab : public partial_symtab
+struct ctf_psymtab : public standard_psymtab
{
ctf_psymtab (const char *filename, struct objfile *objfile, CORE_ADDR addr)
- : partial_symtab (filename, objfile, addr)
+ : standard_psymtab (filename, objfile, addr)
{
}