This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[0/4] RFC: add DWARF index support
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 30 Jun 2010 16:32:56 -0600
- Subject: [0/4] RFC: add DWARF index support
- Reply-to: Tom Tromey <tromey at redhat dot com>
This patch series adds support for a DWARF index to gdb.
The idea is to speed up gdb startup time by constructing a read-only
mmap()able index for the DWARF. Then, rather than create psymtabs, we
simply map in this index and use it.
You can see some performance results for the index here (read the whole
thread, some initial results were wrong):
http://sourceware.org/ml/archer/2010-q2/msg00055.html
This code is somewhat complementary to my earlier series to read
psymtabs in the background. I haven't yet merged the two; but when I do
so I think I will also arrange for the index file to be mapped in a
background thread (to avoid needless I/O waits during startup).
I did investigate some other approaches before discarding them:
* Use the existing .debug_pubnames and .debug_pubtypes sections. These
are specified by DWARF, so they would be preferable.
However, they don't include all the information that gdb needs (in
particular, static symbols and enum constants), and due to C++ name
canonicalization, actually reading these sections is just as slow as
using psymtabs.
* Use sqlite instead of our own format. sqlite is just too slow for our
purposes (it takes way too long to make the index) and also the
resulting database files are much bigger.
I'd appreciate comments on this.
Tom