about summary refs log tree commit diff stats
path: root/dev/c/src/linux/rungdb.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dev/c/src/linux/rungdb.sh')
-rw-r--r--dev/c/src/linux/rungdb.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/dev/c/src/linux/rungdb.sh b/dev/c/src/linux/rungdb.sh
new file mode 100644
index 0000000..9408d7f
--- /dev/null
+++ b/dev/c/src/linux/rungdb.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+gdb \
+    -ex "add-auto-load-safe-path $(pwd)" \
+    -ex "file vmlinux" \
+    -ex 'set arch i386:x86-64:intel' \
+    -ex 'target remote localhost:1234' \
+    -ex 'hbreak start_kernel' \
+    -ex 'continue' \
+    -ex 'disconnect' \
+    -ex 'set arch i386:x86-64' \
+    -ex 'target remote localhost:1234'