gdb: fix dwarf2/cooked-index.c compilation on 32-bit systems
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 30 Jan 2023 20:46:15 +0000 (15:46 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 30 Jan 2023 21:15:17 +0000 (16:15 -0500)
commit902d61e3285aa88e635195a0f77541c44d1dfb2c
treeb7f34451fa7f6cf3c6ccbbd762c3781cf35c7a4d
parent214d883794db819617ee60806e3dbeb3d5dab666
gdb: fix dwarf2/cooked-index.c compilation on 32-bit systems

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