KDB介绍和使用



KDB介绍和使用。

Introduction and basic resources
Here is some information about KDB – the in-kernel debugger for the Linux kernel.

The KDB and KGDB official wiki: https://kgdb.wiki.kernel.org/ (this only has 2 pages?)

Jason Wessel is the current KDB maintainer. Here is a presentation from him at LinuxCon 2010 (August 2010):

http://kernel.org/pub/linux/kernel/people/jwessel/dbg_webinar/State_Of_kernel_debugging_LinuxCon2010.pdf

Here are some videos showing use of KDB and KGDB:

video 1 of 6: http://www.youtube.com/watch?v=V6Qc8ppJ_jc – example of a call to panic from a test module (without a debugger)
video 2 of 6: http://www.youtube.com/watch?v=LqAhY8K3XzI – example of catching the panic with KDB, and looking up the source line with gdb
video 3 of 6: http://www.youtube.com/watch?v=bBEh_UduX04 – example of a bad access request, and looking up the source line with gdb
video 4 of 6: http://www.youtube.com/watch?v=MfJU2E0aJwg – example of using a hardware breakpoint with kdb
video 5 of 6: http://www.youtube.com/watch?v=sWiHV5mt8_k – use an address watch (hardware watchpoint) using kgdb (data access hardware breakpoint on tp_address_ref)
video 6 of 6: http://www.youtube.com/watch?v=nnopzcwvLTs – use of kgdb over serial – Start up the agent-proxy and connect and hit a breakpoint a sys_sync
Documentation, up-to-date as of 2010, for KDB and KGDB is at:http://kernel.org/pub/linux/kernel/people/jwessel/kdb/