This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: FYI DWARF .gdb_index-like proposal by Apple
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb at sourceware dot org
- Date: Mon, 27 May 2013 19:32:51 +0200
- Subject: Re: FYI DWARF .gdb_index-like proposal by Apple
- References: <20130527133410 dot GA8971 at host2 dot jankratochvil dot net>
On Mon, 27 May 2013 15:34:10 +0200, Jan Kratochvil wrote:
> just a highlight of submitted DWARF extension with new indexes:
> http://www.dwarfstd.org/ShowIssue.php?issue=130410.1&type=open
>
> I have not checked yet if it is sufficient for GDB instead of .gdb_index.
In the proposal ".debug_names" entries for DW_TAG_variable should support also
TLS variables (which do not use DW_OP_addr required by the proposal).
Compared with GDB .gdb_index:
http://sourceware.org/gdb/current/onlinedocs/gdb/Index-Section-Format.html#Index-Section-Format
(1) The proposal does not have any address -> name index;
there is .debug_aranges but that is probably deprecated by the proposal
above plus it has other issues:
http://www.dwarfstd.org/ShowIssue.php?issue=100430.1&type=open
http://www.dwarfstd.org/ShowIssue.php?issue=100430.2&type=open
(2) The proposal symbol names are either fully qualified mangled or just
DW_AT_name; .gdb_index uses demangled fully qualified name.
The problem is GDB cannot mangle names so GDB would have to make
the look up via DW_AT_name where may occur many lookup collisions.
(3) .gdb_index has single hash table;
the proposal uses 3 hash tables, this is less efficient.
One should use DW_ATOM_die_tag there anyway to look up only symbol kinds
GDB is interested in - .gdb_index uses it with performance gain in:
http://sourceware.org/ml/gdb-patches/2012-06/msg00607.html
And with DW_ATOM_die_tag present the 3 hash tables could be merged.
(4) .gdb_index provides global/static flag for each symbol;
one could use new DW_ATOM_* kind but that costs 1 byte, not 1 bit;
one wants to look up only global symbol first while there are usually many
static symbols of the same name, performance data is in the same URL above.
Jan