Linux kgdb command and linuxkgdb command
I. Introduction
Kgdb is a source code-level Linux kernel debugger. When using kgdb to debug the kernel, you need to use it with gdb. They can perform single-step debugging on the kernel, set breakpoints, and observe the values of variables and registers and other functions related to application debugging. However, it also has restrictions. We will introduce the principle of the kgdb Debugger in the next step. This article only briefly introduces the process of using Kgbd.
https://kgdb.wiki.kernel.org/index.php/Main_Page
Ii. installation and configuration
1) enable the kgdb and kdb configuration options and recompile the kernel.
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) set the startup item, and modify the startup files of the server and client respectively:/boot/grub. conf as follows:
Server:
kgdboc=ttyS1,115200
Client:
kgdboc=ttyS1,115200 kgdbwait
3) Serial Port Settings
http://www.goupteam.com/tech-expand/1259.html
https://www.vmware.com/support/ws5/doc/ws_devices_serial_2vms.html
Iii. Use instances
1) kernel debugging
http://blog.chinaunix.net/uid-20672257-id-2936794.html
2) module debugging
http://blog.chinaunix.net/uid-20672257-id-2936794.html
http://www.linuxidc.com/Linux/2013-01/77969.htm
Iv. FAQs
1) switch between kdb and kgdb
http://www.zeuux.com/blog/content/3736/
Reference: http://blog.chinaunix.net/uid-25538637-id-261329.html