From: Julian Seward Date: Wed, 20 Jul 2016 17:01:55 +0000 (+0000) Subject: If an instruction can't be decoded, print the first 10 bytes at RSP X-Git-Tag: svn/VALGRIND_3_12_0^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7889bae07ba694ae0c4b45db215822a1e19cbf65;p=thirdparty%2Fvalgrind.git If an instruction can't be decoded, print the first 10 bytes at RSP rather than 8. 8 is not enough to disambiguate the instruction in some situations, in particular where there is a control immediate byte at the end of the instruction. git-svn-id: svn://svn.valgrind.org/vex/trunk@3229 --- diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index 4c9a1221a4..1fe5653280 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -32077,7 +32077,7 @@ DisResult disInstr_AMD64_WRK ( /* All decode failures end up here. */ if (sigill_diag) { vex_printf("vex amd64->IR: unhandled instruction bytes: " - "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", + "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", getUChar(delta_start+0), getUChar(delta_start+1), getUChar(delta_start+2), @@ -32085,7 +32085,9 @@ DisResult disInstr_AMD64_WRK ( getUChar(delta_start+4), getUChar(delta_start+5), getUChar(delta_start+6), - getUChar(delta_start+7) ); + getUChar(delta_start+7), + getUChar(delta_start+8), + getUChar(delta_start+9) ); vex_printf("vex amd64->IR: REX=%d REX.W=%d REX.R=%d REX.X=%d REX.B=%d\n", haveREX(pfx) ? 1 : 0, getRexW(pfx), getRexR(pfx), getRexX(pfx), getRexB(pfx));