* [pushed] Use sect_offset_str in cooked_index::dump
@ 2023-08-28 16:36 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-08-28 16:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
Mark Wielaard pointed out that cooked_index::dump uses PRIx64, and
Andreas Schwab pointed out that gdb already has sect_offset_str. This
patch applies both these observations.
---
gdb/dwarf2/cooked-index.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 351f0016402..d6531260c86 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -584,8 +584,7 @@ cooked_index::dump (gdbarch *arch) const
gdb_printf (" qualified: %s\n", entry->full_name (&temp_storage, false));
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: 0x%" PRIx64 "\n",
- to_underlying (entry->die_offset));
+ gdb_printf (" DIE offset: %s\n", sect_offset_str (entry->die_offset));
if (entry->parent_entry != nullptr)
gdb_printf (" parent: ((cooked_index_entry *) %p) [%s]\n",
--
2.40.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-28 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28 16:36 [pushed] Use sect_offset_str in cooked_index::dump Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).