diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-01-30 15:46:15 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-01-30 15:47:37 -0500 |
commit | 74a79fe154bf95a73752ddaee4a13fa8d8a3b7d8 (patch) | |
tree | bdeaac3fa265e6deff12d9acd51ff3f8da9097dd | |
parent | 7d82b08e9e0a7a22943b843972cd1b8ae1328884 (diff) | |
download | binutils-gdb-users/simark/try-fix-arm2.tar.gz |
gdb: fix dwarf2/cooked-index.c compilation on 32-bit systemsusers/simark/try-fix-arm2
The armhf 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
-rw-r--r-- | gdb/dwarf2/cooked-index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index 9dbb844cade..82dc44dd74b 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) |