From 5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 3 May 2021 23:27:16 -0400 Subject: 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. --- sim/cr16/ChangeLog | 4 ++++ sim/cr16/interp.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'sim/cr16') 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 + + * interp.c (sim_create_inferior): Use BFD_VMA_FMT and drop cast. + 2021-05-01 Mike Frysinger * 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); -- cgit v1.1