When "dis" command fails disassembling because the last command byte sequence has terminated earlier, a successive "dis" command starts disassembling from the wrong address and results in further failure.
Step to reproduce:
Step 0. Suppose several 2 byte length instructions are at address 0xf800.
Step 1. |dis|assemble 3 bytes from 0xf800.
Step 2. repeated |dis| assemble by just |return| to the command prompt.
Observed behavior:
After step 1, if an instruction at the address is 2 byte length and successfully disassembled, the 3rd byte is just displayed and fails disassembled.
After step 2, disassembling starts at address 0xf803 and fails disassembling, or may success disassembling but on wrong byte sequence.
Expected behavior:
After step 1, the 3rd byte may not necessarily be displayed.
After step 2, disassembling should start from the last succeeded disassembling address, 0xf802 in this case.
We may want to prohibit an odd number length for a disassembling length. Though we may terminate instruction byte sequence earlier even using even number length, for instance 4 byte boundary on 6 byte length instruction.
When "dis" command fails disassembling because the last command byte sequence has terminated earlier, a successive "dis" command starts disassembling from the wrong address and results in further failure.
Step to reproduce: Step 0. Suppose several 2 byte length instructions are at address 0xf800. Step 1. |dis|assemble 3 bytes from 0xf800. Step 2. repeated |dis| assemble by just |return| to the command prompt.
Observed behavior: After step 1, if an instruction at the address is 2 byte length and successfully disassembled, the 3rd byte is just displayed and fails disassembled. After step 2, disassembling starts at address 0xf803 and fails disassembling, or may success disassembling but on wrong byte sequence.
Expected behavior: After step 1, the 3rd byte may not necessarily be displayed. After step 2, disassembling should start from the last succeeded disassembling address, 0xf802 in this case.
We may want to prohibit an odd number length for a disassembling length. Though we may terminate instruction byte sequence earlier even using even number length, for instance 4 byte boundary on 6 byte length instruction.