aboutsummaryrefslogtreecommitdiff
path: root/sim/cr16
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-03 23:27:16 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-04 08:13:45 -0400
commit5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 (patch)
tree89d9ac8cad39ef7afdf6dfa1d93a5f06b87a440f /sim/cr16
parent225bda24db9671e2087fda892f94141625836a40 (diff)
downloadgdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.zip
gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.gz
gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.bz2
sim: clean up bfd_vma printing
A lot of this code predates the bfd_vma format define, so we have a random mix of casts to known types so we can printf the value. Use the BFD_VMA_FMT that now exists to simplify and reliability output across different build configs.
Diffstat (limited to 'sim/cr16')
-rw-r--r--sim/cr16/ChangeLog4
-rw-r--r--sim/cr16/interp.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 654b4e0..ebf601f 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,7 @@
+2021-05-04 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_create_inferior): Use BFD_VMA_FMT and drop cast.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index 4615006..8f7fafa 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -672,7 +672,8 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
start_address = 0x0;
#ifdef DEBUG
if (cr16_debug)
- sim_io_printf (sd, "sim_create_inferior: PC=0x%lx\n", (long) start_address);
+ sim_io_printf (sd, "sim_create_inferior: PC=0x%" BFD_VMA_FMT "x\n",
+ start_address);
#endif
{
SIM_CPU *cpu = STATE_CPU (sd, 0);