From: Florian K. <fk...@so...> - 2025-06-30 19:32:26
|
https://sourceware.org/cgit/valgrind/commit/?id=c56fbcb7c6e8c821be67c7e8d317116f5deff274 commit c56fbcb7c6e8c821be67c7e8d317116f5deff274 Author: Florian Krohm <fl...@ei...> Date: Mon Jun 30 19:31:33 2025 +0000 s390x: Fix diagnostic for S390_DECODE_UNKNOWN_SPECIAL_INSN When decoding fails the insn bytes (at most 6) are shown. However, "special insns" are 10 bytes with the last 2 bytes being the interesting ones. Print them all. Diff: --- VEX/priv/guest_s390_toIR.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index b3ee122c5a..f40cd15e85 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -23881,12 +23881,10 @@ s390_decode_and_irgen(const UChar *bytes, UInt insn_length, DisResult *dres) vpanic("s390_decode_and_irgen"); } - vex_printf("%02x%02x", bytes[0], bytes[1]); - if (insn_length > 2) { - vex_printf(" %02x%02x", bytes[2], bytes[3]); - } - if (insn_length > 4) { - vex_printf(" %02x%02x", bytes[4], bytes[5]); + for (unsigned i = 0; i < insn_length; i += 2) { + if (i != 0) + vex_printf(" "); + vex_printf("%02x%02x", bytes[i], bytes[i + 1]); } vex_printf("\n"); } |