aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-24 00:16:08 -0400
committerMike Frysinger <vapier@gentoo.org>2021-04-24 00:18:48 -0400
commit3886790f133ce1ee2f30ebf37bb7dec1f812f29a (patch)
treee58608538331f7aac1890b7ec00c1faed979cd82 /sim
parent837b53fd088d13dda77b1d9db73800163692c2e3 (diff)
downloadgdb-3886790f133ce1ee2f30ebf37bb7dec1f812f29a.zip
gdb-3886790f133ce1ee2f30ebf37bb7dec1f812f29a.tar.gz
gdb-3886790f133ce1ee2f30ebf37bb7dec1f812f29a.tar.bz2
sim: dv-cfi: fix printf format
Use the existing PRI constants to select the right format rather than assume signed_cell is always %u. Fixes building for riscv64.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/dv-cfi.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ed4d9f7..516e214 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,9 @@
2021-04-24 Mike Frysinger <vapier@gentoo.org>
+ * dv-cfi.c (attach_cfi_regs): Change %u to PRIiTC.
+
+2021-04-24 Mike Frysinger <vapier@gentoo.org>
+
* sim-options.c (ARG_HASH_SIZE): Increase to 256.
(sim_parse_args): Call SIM_ASSERT.
diff --git a/sim/common/dv-cfi.c b/sim/common/dv-cfi.c
index afc020a..b865227 100644
--- a/sim/common/dv-cfi.c
+++ b/sim/common/dv-cfi.c
@@ -610,7 +610,7 @@ attach_cfi_regs (struct hw *me, struct cfi *cfi)
if (cfi_cmdsets[i]->id == ival)
cfi->cmdset = cfi_cmdsets[i];
if (cfi->cmdset == NULL)
- hw_abort (me, "cmdset %u not supported", ival);
+ hw_abort (me, "cmdset %" PRIiTC " not supported", ival);
if (ret == 2)
{