aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-27 00:02:11 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-27 23:33:26 -0400
commit2b83b95803d745d0a57ae7331a285aa692c6e425 (patch)
treed4ab6ecb7a692c04d118129b79365fd98f14c373 /sim
parent247867ebd359f46d0b67822f175f4721a52402ba (diff)
downloadgdb-2b83b95803d745d0a57ae7331a285aa692c6e425.zip
gdb-2b83b95803d745d0a57ae7331a285aa692c6e425.tar.gz
gdb-2b83b95803d745d0a57ae7331a285aa692c6e425.tar.bz2
sim: frv: fix some printf type mismatch warnings
The %p usage was a real bug that would probably cause a crash.
Diffstat (limited to 'sim')
-rw-r--r--sim/frv/ChangeLog5
-rw-r--r--sim/frv/profile.c2
-rw-r--r--sim/frv/sim-if.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 0877169..cb4e2cf 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,10 @@
2021-06-27 Mike Frysinger <vapier@gentoo.org>
+ * profile.c (wait_for_flush): Change %p to %x.
+ * sim-if.c (sim_open): Change %lx to %x.
+
+2021-06-27 Mike Frysinger <vapier@gentoo.org>
+
* traps.c (frv_break): Delete pc and pass down NULL_CIA.
2021-06-27 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/frv/profile.c b/sim/frv/profile.c
index 94212bf..89332e5 100644
--- a/sim/frv/profile.c
+++ b/sim/frv/profile.c
@@ -901,7 +901,7 @@ wait_for_flush (SIM_CPU *cpu)
}
if (TRACE_INSN_P (cpu) && wait)
{
- sprintf (hazard_name, "Data cache flush address %p:", address);
+ sprintf (hazard_name, "Data cache flush address %x:", address);
frv_model_trace_wait_cycles (cpu, wait, hazard_name);
}
}
diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
index 758e17a..3dd76ad 100644
--- a/sim/frv/sim-if.c
+++ b/sim/frv/sim-if.c
@@ -86,7 +86,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd,
/* Allocate core managed memory if none specified by user.
Use address 4 here in case the user wanted address 0 unmapped. */
if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
- sim_do_commandf (sd, "memory region 0,0x%lx", FRV_DEFAULT_MEM_SIZE);
+ sim_do_commandf (sd, "memory region 0,0x%x", FRV_DEFAULT_MEM_SIZE);
/* check for/establish the reference program image */
if (sim_analyze_program (sd,