This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
riscv-tdep.c in 32-bits build
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Thu, 20 Dec 2018 17:26:01 +0000
- Subject: riscv-tdep.c in 32-bits build
Hi Andrew,
I just noticed this error when building for i386-linux-gnu.
CXX riscv-tdep.o
/home/emaisin/src/binutils-gdb/gdb/riscv-tdep.c: In function ‘CORE_ADDR riscv_scan_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, riscv_unwind_cache*)’:
/home/emaisin/src/binutils-gdb/gdb/riscv-tdep.c:1548:43: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘CORE_ADDR {aka long long unsigned int}’ [-Werror=format=]
offset);
^
I looked at it a bit and decided to let you choose how you wanted to fix
it. Since this is a CORE_ADDR, I first thought we should call paddress.
But this variable represents an offset, not an absolute address, so I am
not sure if paddress is really appropriate.
Simon