sim: fix BFD_VMA format arguments on 32-bit hosts [PR gdb/29184]
authorSergei Trofimovich <siarheit@google.com>
Sat, 21 May 2022 07:53:50 +0000 (08:53 +0100)
committerSergei Trofimovich <siarheit@google.com>
Wed, 15 Jun 2022 22:12:56 +0000 (23:12 +0100)
commit33b90f59f3465041a620ad4f6504a35b578cfc65
treecf1aaa6ae6c7eb4a14641e251e58fc04a8463803
parent9d741cbedb8a7a77bb7c99bbbc363d5af4ba62c2
sim: fix BFD_VMA format arguments on 32-bit hosts [PR gdb/29184]

Noticed format mismatch when attempted to build gdb on i686-linux-gnu
in --enable-64-bit-bfd mode:

    sim/../../sim/cris/sim-if.c:576:28:
        error: format '%lx' expects argument of type 'long unsigned int',
        but argument 4 has type 'bfd_size_type' {aka 'long long unsigned int'} [-Werror=format=]
      576 |       sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x,0x%lx",
          |                            ^~~~~~~~~~~~~~~~~~~
      577 |          interp_load_addr, interpsiz);
          |                            ~~~~~~~~~
          |                            |
          |                            bfd_size_type {aka long long unsigned int}

While at it fixed format string for time-related types.
sim/cris/sim-if.c
sim/m32c/syscalls.c
sim/rx/syscalls.c