diff options
author | Tom de Vries <tdevries@suse.de> | 2021-06-12 10:46:05 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-06-24 17:59:27 +0200 |
commit | ad5096892ca6a829f719533f94eaadecc0c5637d (patch) | |
tree | 3da373bbf1bcf08589d64b87f566aced8c8ea66e /gdb/dwarf2/read.c | |
parent | af7349863ca426ecf789047ca17b960d6f9bbee9 (diff) | |
download | binutils-users/vries/lazy-symtab-expansion.zip binutils-users/vries/lazy-symtab-expansion.tar.gz binutils-users/vries/lazy-symtab-expansion.tar.bz2 |
[gdb/symtab] Add reset_compunit_symtabusers/vries/lazy-symtab-expansion
Add a new function reset_compunit_symtab.
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r-- | gdb/dwarf2/read.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index cf6dc08..2a2edf5 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -1729,7 +1729,8 @@ dwarf2_per_objfile::set_symtab (const dwarf2_per_cu_data *per_cu, compunit_symtab *symtab) { gdb_assert (per_cu->index < this->m_symtabs.size ()); - gdb_assert (this->m_symtabs[per_cu->index] == nullptr); + gdb_assert (this->m_symtabs[per_cu->index] == nullptr + || symtab == nullptr); this->m_symtabs[per_cu->index] = symtab; } @@ -5674,6 +5675,10 @@ struct dwarf2_include_psymtab : public partial_symtab return nullptr; } + void reset_compunit_symtab (struct objfile *objfile) override + { + } + private: partial_symtab *includer () const { @@ -8587,6 +8592,13 @@ dwarf2_psymtab::get_compunit_symtab (struct objfile *objfile) const return per_objfile->get_symtab (per_cu_data); } +void +dwarf2_psymtab::reset_compunit_symtab (struct objfile *objfile) +{ + dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); + per_objfile->set_symtab (per_cu_data, nullptr); +} + /* Trivial hash function for die_info: the hash value of a DIE is its offset in .debug_info for this objfile. */ |