* [pushed] gdb: fix dwarf2/cooked-index.c compilation on 32-bit systems
@ 2023-01-30 21:15 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2023-01-30 21:15 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
The i386 builder shows:
../../binutils-gdb/gdb/dwarf2/cooked-index.c: In member function ‘void cooked_index_vector::dump(gdbarch*) const’:
../../binutils-gdb/gdb/dwarf2/cooked-index.c:492:40: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘std::__underlying_type_impl<sect_offset, true>::type’ {aka ‘long long unsigned int’} [-Werror=format=]
492 | gdb_printf (" DIE offset: 0x%lx\n",
| ~~^
| |
| long unsigned int
| %llx
493 | to_underlying (entry->die_offset));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| std::__underlying_type_impl<sect_offset, true>::type {aka long long unsigned int}
The die_offset's underlying type is uint64, so use PRIx64 in the format
string.
Change-Id: Ibdde4c624ed1bb50eced9a514a4e37aec70a1323
---
gdb/dwarf2/cooked-index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 9dbb844caded..82dc44dd74b0 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -489,7 +489,7 @@ cooked_index_vector::dump (gdbarch *arch) const
gdb_printf (" canonical: %s\n", entry->canonical);
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%lx\n",
+ gdb_printf (" DIE offset: 0x%" PRIx64 "\n",
to_underlying (entry->die_offset));
if (entry->parent_entry != nullptr)
--
2.39.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-30 21:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 21:15 [pushed] gdb: fix dwarf2/cooked-index.c compilation on 32-bit systems Simon Marchi
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).