diff options
author | Doug Evans <dje@google.com> | 2013-08-26 18:43:40 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-08-26 18:43:40 +0000 |
commit | 779bd270818aeb064c2d218ad8f80a3b608f95c9 (patch) | |
tree | fb185930bd90ba56daf0ab93bd714834a0cf58fa /gdb/dwarf2read.c | |
parent | 52e260a34ef6e013980890bee0d5435cfc14e9c4 (diff) | |
download | gdb-779bd270818aeb064c2d218ad8f80a3b608f95c9.zip gdb-779bd270818aeb064c2d218ad8f80a3b608f95c9.tar.gz gdb-779bd270818aeb064c2d218ad8f80a3b608f95c9.tar.bz2 |
PR symtab/15885
* dwarf2read.c (dw2_dump): Print some minimal information indicating
.gdb_index is in use.
* symfile.c (reread_symbols): Reset objfile->sf.
testsuite/
* gdb.dwarf2/Makefile.in (EXECUTABLES): Add gdb-index.
(clean): rm -f *.gdb-index *.with-index.
* gdb.dwarf2/gdb-index.exp: New testcase.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index d1ce946..6027f78 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3357,10 +3357,25 @@ dw2_print_stats (struct objfile *objfile) printf_filtered (_(" Number of unread CUs: %d\n"), count); } +/* This dumps minimal information about the index. + It is called via "mt print objfiles". + One use is to verify .gdb_index has been loaded by the + gdb.dwarf2/gdb-index.exp testcase. */ + static void dw2_dump (struct objfile *objfile) { - /* Nothing worth printing. */ + dw2_setup (objfile); + gdb_assert (dwarf2_per_objfile->using_index); + printf_filtered (".gdb_index:"); + if (dwarf2_per_objfile->index_table != NULL) + { + printf_filtered (" version %d\n", + dwarf2_per_objfile->index_table->version); + } + else + printf_filtered (" faked for \"readnow\"\n"); + printf_filtered ("\n"); } static void |