PR symtab/15885
[deliverable/binutils-gdb.git] / gdb / dwarf2read.c
index d1ce9460bacc60a21ae765f434e230d361d5e635..6027f7811572f8a7e917df980b1a25fe3df27a00 100644 (file)
@@ -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
This page took 0.033213 seconds and 4 git commands to generate.