This is the mail archive of the
mailing list for the GDB project.
[RFC 0/7] make psymbols independent of progspace
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 20 Feb 2014 14:31:57 -0700
- Subject: [RFC 0/7] make psymbols independent of progspace
- Authentication-results: sourceware.org; auth=none
This patch series changes partial symbols to be independent of the
This is done following the same general approach as was taken for
minimal symbols and for SystemTap probes. It is based on top of the
minimal symbol series.
One thing to note is that this series does not actually move partial
symbols or partial symbol tables to the per-BFD object. This is
harder than it may seem.
One problem is that psymtabs have a back-link to the symtab. This
could be broken in various ways, for example moving the mapping to a
hash table on the objfile. (Temporarily, since once symtabs are moved
to the per-BFD, we could revert to the current scheme.)
However, there are other lurking issues. E.g., in the DWARF reader
there are further back-links in the .gdb_index code. And, I think
some fields of the dwarf2_per_objfile object are initialized during
One idea for the next step of improvements here would be to move the
psymbol bcache to the per-BFD object. This would allow sharing the
psymbols at least, if not the psymtabs. This is not extremely hard,
* Some code paths in dwarf2read.c allocate psymbol names on the
objfile_obstack; and as this code is shared with the full symbol
reader it isn't trivial to move this. Specifically,
read_partial_die calls dwarf2_canonicalize_name. This could be
solved either by noting the fact in the partial DIE and then later
copying the name; or by introducing a new bcache to hold canonical
* add_psymbol_to_list checks to see whether the psymbol was added to
the cache. This would have to change to a post-pass to remove
I think a more likely route forward instead is to convert symbols,
symbol tables, types, and whatever issues there are in dwarf2read; and
then move all these data structures to the per-BFD object at one time.
Built and regtested on x86-64 Fedora 18, both in the default mode and
with -gstabs+; and on AIX (gcc111).