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

Andrew Burgess andrew.burgess@embecosm.com
Tue Mar 6 14:32:00 GMT 2018


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(-)

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));
 	}
     }
 
-- 
2.14.3



More information about the Gdb-patches mailing list