[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[COMMITTED] pvm, testsuite: fix handling of odd-sized unsigned ints in p
From: |
Jose E. Marchesi |
Subject: |
[COMMITTED] pvm, testsuite: fix handling of odd-sized unsigned ints in pvm_print_val |
Date: |
Sun, 12 Jan 2020 22:41:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi Ege.
FYI. I just committed the patch below, that fixes the problem you
reported while printing unsigned integers of odd sizes.
Salud!
commit 46d418e3e809fd1292d802ef83c75c23b197fea4
Author: Jose E. Marchesi <address@hidden>
Date: Sun Jan 12 22:38:58 2020 +0100
pvm, testsuite: fix handling of odd-sized unsigned ints in pvm_print_val
2020-01-12 Jose E. Marchesi <address@hidden>
* src/pvm-val.c (pvm_print_val): Fix printing of hexadecimal
values with odd widths.
* testsuite/poke.map/maps-uint-19.pk: Test for the above.
diff --git a/ChangeLog b/ChangeLog
index 38fbdf0..23623fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-12 Jose E. Marchesi <address@hidden>
+
+ * src/pvm-val.c (pvm_print_val): Fix printing of hexadecimal
+ values with odd widths.
+ * testsuite/poke.map/maps-uint-19.pk: Test for the above.
+
2020-01-12 John Darrington <address@hidden>
* doc/poke.texi: Fixed various typos.
diff --git a/src/pvm-val.c b/src/pvm-val.c
index b3655a2..e4a35d4 100644
--- a/src/pvm-val.c
+++ b/src/pvm-val.c
@@ -583,7 +583,7 @@ pvm_print_val (pvm_val val, int base, int flags)
uint16_fmt = "0x%" PRIx32 "UH";
uint8_fmt = "0x%" PRIx32 "UB";
uint4_fmt = "0x%" PRIx32 "UN";
- uint_fmt = "(uint<%d>) 0x%" PRIo32;
+ uint_fmt = "(uint<%d>) 0x%" PRIx32;
break;
case 2:
/* This base doesn't use printf's formatting strings, but its
diff --git a/testsuite/poke.map/maps-uint-19.pk
b/testsuite/poke.map/maps-uint-19.pk
index f35e6d0..7eb1b5a 100644
--- a/testsuite/poke.map/maps-uint-19.pk
+++ b/testsuite/poke.map/maps-uint-19.pk
@@ -2,5 +2,8 @@
/* { dg-data {c*} {0x51 0x23 0x45 0x67 0x89 0xab 0xcd 0xef 0x51 0x23 0x45 0x67
0x89 0xab 0xcd 0xef} } */
/* { dg-command { .set endian little } } */
+/* { dg-command { .set obase 16 } } */
/* { dg-command { printf "%u29x\n", uint<29> @ 15#b } } */
/* { dg-output "1ac4b3a2" } */
+/* { dg-command { uint<29> @ 15#b } } */
+/* { dg-output "\n\\(uint<29>\\) 0x1ac4b3a2" } */
- [COMMITTED] pvm, testsuite: fix handling of odd-sized unsigned ints in pvm_print_val,
Jose E. Marchesi <=