我阅读了最近的文章“最长的 x86 指令”
http://blog.onlinedisassembler.com/blog/?p=23
我尝试使用 masm 在 Win7x86 开发平台上重现奇怪的反汇编问题,正如文章所建议的那样,冗余前缀。
说话很便宜,所以这是一个玩具程序(masm32):
.386 .model flat, stdcall
option casemap:none
includelib \x\x\kernel32.lib
includelib \x\x\user32.lib
include \x\x\kernel32.inc
include \x\x\user32.inc
include \x\x\windows.inc
.code
start:
db 0F3h
db 0F3h
db 0F3h
db 0F3h
db 0F3h
db 0F3h
db 0F3h
;...6 more bytes later
db 089h
db 0E5h
end start
invoke ExitProcess, NULL
链接和组装后,我在windbg 中打开了生成的可执行文件。
令我失望的是,当我单步执行,反汇编 $exentry 等时,windbg 只是将前缀/字节视为单独的指令,说“见鬼去吧”并仅执行有效指令。
有什么我想念的吗?