aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-05-27 11:13:48 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-27 11:13:48 -0400
commit5717c425a62c8e15a5936acdfa2bac2732aeb9b4 (patch)
tree86cb17e5e89da416acd4bc0addb8e13bca248c5d /gdb/dwarf2
parent45940949265417e8a21b5936e906cf24a3177001 (diff)
downloadgdb-5717c425a62c8e15a5936acdfa2bac2732aeb9b4.zip
gdb-5717c425a62c8e15a5936acdfa2bac2732aeb9b4.tar.gz
gdb-5717c425a62c8e15a5936acdfa2bac2732aeb9b4.tar.bz2
Add "objfile" parameter to two partial_symtab methods
This series will cause partial symtabs to be shared across objfiles. However, full symtabs and symbols will still be objfile-dependent, so will be expanded separately for each objfile. So, a debug info reader will need to know which objfile to consult when expanding a partial symtab. This patch adds an objfile parameter to the two relevant methods of partial_symtab. Current implementations simply ignore them. gdb/ChangeLog: * psymtab.c (partial_map_expand_apply) (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol) (psym_lookup_global_symbol_language) (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): Update. * psympriv.h (struct partial_symtab) <readin_p, get_compunit_symtab>: Add objfile parameter. (struct standard_psymtab) <readin_p, get_compunit_symtab>: Likewise. * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p, get_compunit_symtab>: Likewise. (dwarf2_psymtab::expand_psymtab): Pass objfile argument. Change-Id: I3f0b26787c3e78f7fb78b9fc011d91fb8690f3a0
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 3996a8a..59f3a08 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -6040,12 +6040,12 @@ struct dwarf2_include_psymtab : public partial_symtab
gdb_assert (false);
}
- bool readin_p () const override
+ bool readin_p (struct objfile *objfile) const override
{
- return includer ()->readin_p ();
+ return includer ()->readin_p (objfile);
}
- struct compunit_symtab *get_compunit_symtab () const override
+ compunit_symtab *get_compunit_symtab (struct objfile *objfile) const override
{
return nullptr;
}
@@ -8987,7 +8987,7 @@ dwarf2_psymtab::expand_psymtab (struct objfile *objfile)
expand_dependencies (objfile);
dw2_do_instantiate_symtab (per_cu_data, false);
- gdb_assert (get_compunit_symtab () != nullptr);
+ gdb_assert (get_compunit_symtab (objfile) != nullptr);
}
/* Trivial hash function for die_info: the hash value of a DIE