]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Document steps to debug kernel using KGDB
authorSasha Levin <levinsasha928@gmail.com>
Mon, 19 Sep 2011 11:05:56 +0000 (14:05 +0300)
committerSasha Levin <levinsasha928@gmail.com>
Mon, 19 Sep 2011 11:05:56 +0000 (14:05 +0300)
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
tools/kvm/Documentation/kernel-debugging.txt [new file with mode: 0644]

diff --git a/tools/kvm/Documentation/kernel-debugging.txt b/tools/kvm/Documentation/kernel-debugging.txt
new file mode 100644 (file)
index 0000000..7feeb30
--- /dev/null
@@ -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).