This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]