mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-21 21:07:20 +00:00
kvm tools: Document steps to debug kernel using KGDB
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
This document explains how to debug a guests' kernel using KGDB.
|
||||
|
||||
1. Run the guest:
|
||||
'kvm run -k [vmlinuz] -p "kgdboc=ttyS1 kgdbwait" --tty 1'
|
||||
|
||||
And see which PTY got assigned to ttyS1 (you'll see:
|
||||
' Info: Assigned terminal 1 to pty /dev/pts/X').
|
||||
|
||||
2. Run GDB on the host:
|
||||
'gdb [vmlinuz]'
|
||||
|
||||
3. Connect to the guest (from within GDB):
|
||||
'target remote /dev/pty/X'
|
||||
|
||||
4. Start debugging! (enter 'continue' to continue boot).
|
||||
Reference in New Issue
Block a user