]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Print the CU index in cooked_index::dump
authorTom Tromey <tom@tromey.com>
Tue, 24 Sep 2024 23:35:22 +0000 (17:35 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 10 Nov 2025 18:14:35 +0000 (11:14 -0700)
While exploring a question I had about the DWARF indexer, I found I
wanted to see the CU index of each entry.  This patch adds this
information.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/dwarf2/cooked-index.c

index 20bff6f68e162a08224a8d22709db0a594a39b6b..85e6cfcdf0fee04a54e3ded7767190df22092609 100644 (file)
@@ -256,6 +256,7 @@ cooked_index::dump (gdbarch *arch)
       gdb_printf ("    DWARF tag:  %s\n", dwarf_tag_name (entry->tag));
       gdb_printf ("    flags:      %s\n", to_string (entry->flags).c_str ());
       gdb_printf ("    DIE offset: %s\n", sect_offset_str (entry->die_offset));
+      gdb_printf ("    CU index:   %u\n", entry->per_cu->index);
 
       if ((entry->flags & IS_PARENT_DEFERRED) != 0)
        gdb_printf ("    parent:     deferred (%" PRIx64 ")\n",