xref: /kvmtool/Documentation/kernel-debugging.txt (revision a28e0fe5680cfc4f61d88cbe2c2b9f125f277686)
1This document explains how to debug a guests' kernel using KGDB.
2
31. Run the guest:
4        'kvm run -k [vmlinuz] -p "kgdboc=ttyS1 kgdbwait" --tty 1'
5
6And see which PTY got assigned to ttyS1 (you'll see:
7'  Info: Assigned terminal 1 to pty /dev/pts/X').
8
92. Run GDB on the host:
10        'gdb [vmlinuz]'
11
123. Connect to the guest (from within GDB):
13        'target remote /dev/pty/X'
14
154. Start debugging! (enter 'continue' to continue boot).
16