Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 bochs 作为调试器。我使用“s”命令单步执行我的代码。然而,我的问题是,每当“int”指令出现时,它就会开始单步执行 BIOS 代码。有没有我可以输入的命令让它跳过所有的 BIOS 代码并返回到我的代码?
我订阅了 bochs 邮件列表并发送了一封电子邮件询问我的问题。在一封电子邮件中,我得到了一个答案,我应该在“int”指令之后使用“b”命令设置断点,如下所示:
b <address>
然后我应该使用“c”命令继续直到断点。
现在,为了弄清楚“int”指令之后的指令地址是什么,我使用反汇编代码ndisasm并找到“int”指令之后的指令:
ndisasm
0000000A B40E mov ah,0xe
然后我把0000000A, 添加0x7C00到它(因为引导文件从 开始加载到内存中0x7C00),这就是我设置断点的地方。
0000000A
0x7C00