Linux kgdb命令,linuxkgdb命令
一、簡介
kgdb是一種源碼級的Linux核心調試器。使用kgdb調試核心時,需要結合gdb一起使用,使用他們可以對核心進行單步調試,設定斷點,觀察變數、寄存器的值等與應用調試相關的功能。然而也有其限制條件,將在接下來kgdb調試器原理來講述,本文僅簡單介紹使用Kgbd的流程。
https://kgdb.wiki.kernel.org/index.php/Main_Page
二、安裝配置
1)開啟kgdb與kdb配置選項,重新編譯核心
https://www.kernel.org/pub/linux/kernel/people/jwessel/kdb/CompilingAKernel.html#CompileKGDB
http://blog.chinaunix.net/uid-23366077-id-4711134.html
http://www.cnblogs.com/274914765qq/p/4978999.html
2)啟動項設定,分別對server和client的開機檔案:/boot/grub/grub.conf,做如下修改
server:
kgdboc=ttyS1,115200
client:
kgdboc=ttyS1,115200 kgdbwait
3)串口設定
http://www.goupteam.com/tech-expand/1259.html
https://www.vmware.com/support/ws5/doc/ws_devices_serial_2vms.html
三、使用執行個體
1)核心調試
http://blog.chinaunix.net/uid-20672257-id-2936794.html
2)模組調試
http://blog.chinaunix.net/uid-20672257-id-2936794.html
http://www.linuxidc.com/Linux/2013-01/77969.htm
四、常見問題
1)kdb與kgdb模式相互切換
http://www.zeuux.com/blog/content/3736/
參考:http://blog.chinaunix.net/uid-25538637-id-261329.html