cool! 用sourcesight实现内核源码级调试
刺猬@http://blog.csdn.net/littlehedgehog
无意间看到这么好的东西,不敢独享,稍微调整了下文字,另外把我遇到问题说下,免得后来的又来摸索。
原帖:
http://www.oldlinux.org/oldlinux/viewthread.php?tid=11074&extra=page%3D1
环境原作者已经基本配置完好,我已经上传至csdn的资源栏:
http://download.csdn.net/source/520532
http://download.csdn.net/source/520530
下载两个压缩包后解压。我这里把它们移至到D:/。
1、在linux-0.11-gdb压缩包中/linux-0.11目录下打开 MinGW32.bat 。输入"make",等待make完毕。
2、运行start_bochs.bat,敲一下回车,显示waiting for gdb connection on localhost:1234
3、运行bin目录下的insight.exe File->Open 打开linux-0.11/tools目录下的system.exe File->Target Settings Target下拉列表中选择Remote/TCP,hostname:localhost,prot:1234 View->Console,打开控制台 Run->Run ,运行,停在startup_32
控制台中输入以下命令
(gdb) break start
Breakpoint 2 at 0x6624: file init/main.c, line 105.
(gdb) handle SIGSEGV noprint nostop ignore
(gdb) cont Continuing. Breakpoint 2, start () at init/main.c:105
如图所示:
接下来在sourceinsight窗口就可以调试了!
联系客服