Patchwork [1/2] gdb/riscv: Additional print format string fixes

login
register
mail settings
Submitter Andrew Burgess
Date March 6, 2018, 2:31 p.m.
Message ID <fb2946557216c813310ed062a06b55d5dc466bb0.1520346400.git.andrew.burgess@embecosm.com>
Download mbox | patch
Permalink /patch/26212/
State New
Headers show

Comments

Andrew Burgess - March 6, 2018, 2:31 p.m.
Another riscv format string fix.

gdb/ChangeLog:

	* riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
	where appropriate.
---
 gdb/ChangeLog    | 5 +++++
 gdb/riscv-tdep.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index 5c04a740df0..797ca72a842 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -2121,8 +2121,8 @@  riscv_push_dummy_call (struct gdbarch *gdbarch,
 			      call_info.memory.arg_offset);
 	  fprintf_unfiltered (gdb_stdlog, "Stack required (for refs): 0x%x\n",
 			      call_info.memory.ref_offset);
-	  fprintf_unfiltered (gdb_stdlog, "          Stack allocated: 0x%lx\n",
-			      (osp - sp));
+	  fprintf_unfiltered (gdb_stdlog, "          Stack allocated: %s\n",
+			      core_addr_to_string_nz (osp - sp));
 	}
     }