Sometimes, when breaking into a program in the Visual Studio debugger, I see the following weird phenomenon:
The debugger appears to display the next instruction byte as starting after the instruction’s REX prefix.
Not only is this confusing, but it also clearly throws off the debugger itself, as it finds itself unable to show a disassembly of the preceding instructions as a result.
Confusingly enough, however, the program appears to run fine when executing is continued.
Why does this occur? Is the debugger merely displaying the next instruction incorrectly, or does execution actually begin at that byte somehow?