免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1106 | 回复: 0
打印 上一主题 下一主题

利用bochs来调试Linux 0.11内核 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-26 15:14 |只看该作者 |倒序浏览
实验前的准备:
引导程序调试软件bochs,跟配套的linux0.11内核img下载地址分别是:
http://sourceforge.net/projects/bochs/
http://www.oldlinux.org/Linux.old/bochs/linux-0.11-devel-040329.zip
调试环境的的建立
下载linux-0.11-devel-040329.zip,解压缩
其中包含一个bochs2.X的安装程序和linux内核img,
1 、找到bochsrc-hd.bxrc文件的12、36行,替换其中的$ BXSHARE为bochs的安装路径,如果就是上级目录,则可直接改为“..”,如:
#romimage: file=$BXSHAREBIOS-bochs-latest, address=0xf0000
romimage: file=..bochsBochs-2.3BIOS-bochs-latest, address=0xf0000
2 、在添加run.bat文件,内容为:
"..bochsBochs-2.3bochsdbg" -q -f bochsrc-Hd.bxrc
运行run.bat,即启动调试工具bochsdbg。
调试
run.bat运行之后
E:linux011linux-0.11-devel-040329>"..bochsBochs-2.3bochsdbg" -q -f bochsrc-Hd.bxrc
00000000000i[APIC?] local apic in  initializing
========================================================================
Bochs x86 Emulator 2.3
Build from CVS snapshot on August 27, 2006
========================================================================
00000000000i[     ] reading configuration from bochsrc-Hd.bxrc
00000000000i[     ] WARNING: syntax has changed, please use 'vgaromimage: file=...' now
00000000000e[     ] bochsrc-Hd.bxrc: unknown parameter for parport1 ignored.
00000000000e[     ] bochsrc-Hd.bxrc: floppy_command_delay is DEPRECATED (now using hardware timing).
00000000000e[     ] bochsrc-Hd.bxrc: ips directive is DEPRECATED (use cpu directive parameter 'ips').
00000000000i[     ] installing win32 module as the Bochs GUI
00000000000i[     ] using log file bochsout.txt
Next at t=0
(0) [0xfffffff0] f000:fff0 (unk. ctxt): jmp far f000:e05b         ; ea5be000f0


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/2305/showart_2007949.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP