[PATCH][gdb/symtab] Fix partial unit psymtabs
Tom Tromey
tom@tromey.com
Thu Mar 12 19:06:03 GMT 2020
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> This is an artefact resulting from the fact that all CUs in an objfile
Tom> share the same storage array for static partial symbols (and another array for
Tom> global partial symbols), using a range to describe their symbols.
Wow, nice catch. This bug has been there since imported CUs were
implemented.
Tom> + /* Stack of vectors of partial symbols, using during psymtab
Tom> + initialization. */
Tom> +
Tom> + std::vector<std::vector<partial_symbol *>*> current_global_psymbols;
Tom> + std::vector<std::vector<partial_symbol *>*> current_static_psymbols;
I mildly don't like putting this here. Ideally it would be handled
purely in the DWARF reader. However, I see this as a side effect of the
way that psymtabs are currently managed ("poorly"). I have some patches
that change this, and I suppose this could be modified on that branch.
Meanwhile, this patch is ok. Thank you for find this and for this fix.
Tom
More information about the Gdb-patches
mailing list