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視窗就可以調試了!