gdb/riscv: Format CORE_ADDR as a string for printing
Avoid compiler errors caused by trying to print CORE_ADDR using '%ld' format, instead convert to a string and print that instead. gdb/ChangeLog: * riscv-tdep.c (riscv_scan_prologue): Use plongest to format a signed offset as a string.
This commit is contained in:
parent
3dcfdc5865
commit
a96bd1ccc0
|
@ -1,3 +1,8 @@
|
|||
2018-12-21 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* riscv-tdep.c (riscv_scan_prologue): Use plongest to format
|
||||
a signed offset as a string.
|
||||
|
||||
2018-12-21 Dave Murphy <davem@devkitpro.org>
|
||||
|
||||
* dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
|
||||
|
|
|
@ -1542,10 +1542,16 @@ riscv_scan_prologue (struct gdbarch *gdbarch,
|
|||
if (stack.find_reg (gdbarch, i, &offset))
|
||||
{
|
||||
if (riscv_debug_unwinder)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"Register $%s at stack offset %ld\n",
|
||||
gdbarch_register_name (gdbarch, i),
|
||||
offset);
|
||||
{
|
||||
/* Display OFFSET as a signed value, the offsets are from
|
||||
the frame base address to the registers location on
|
||||
the stack, with a descending stack this means the
|
||||
offsets are always negative. */
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"Register $%s at stack offset %s\n",
|
||||
gdbarch_register_name (gdbarch, i),
|
||||
plongest ((LONGEST) offset));
|
||||
}
|
||||
trad_frame_set_addr (cache->regs, i, offset);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue