mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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.
This commit is contained in:
@ -299,8 +299,8 @@ m32c_syscall (int id)
|
||||
|
||||
rv = gettimeofday (&tv, 0);
|
||||
if (trace)
|
||||
printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec,
|
||||
tv.tv_usec, tvaddr);
|
||||
printf ("gettimeofday: %" PRId64 " sec %" PRId64 " usec to 0x%x\n",
|
||||
(int64_t)tv.tv_sec, (int64_t)tv.tv_usec, tvaddr);
|
||||
mem_put_si (tvaddr, tv.tv_sec);
|
||||
mem_put_si (tvaddr + 4, tv.tv_usec);
|
||||
put_reg (r0, rv);
|
||||
|
Reference in New Issue
Block a user