博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

[JOS]how to debug user mode program in bochs

Posted on 2010-02-20 18:45  xuczhang  阅读(225)  评论(0编辑  收藏  举报

1. find the virtual address at the last kernel mode in obj/kernel.asm:
env_pop_tf(&(e->env_tf));
supposed the virtual address is 0xf0102a36
2. vbreak 0x08:0xf0102a36 and debug one by one step and enter the user program
or
directly
vbreak 0x1b:0x00800020