aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2018-12-11 11:51:43 +0100
committerAnders Roxell <anders.roxell@linaro.org>2019-12-02 10:40:21 +0100
commit46efa982f43b7fc2f41966b938b6bd1dbbb21d93 (patch)
tree135ab04f64611c7628de1238c825234116d1d433
parentafcf61d365379159aea4071b3527e90e6dd37598 (diff)
config: provide a fragment to enable gdb for qemu
Adding a fragment to make it easier to know what options is needed to build a kernel to get the that you can debug in qemu. First you need to start qemu with flags '-s -S' and then connect with gdb like below: $ gdb \ ./obj-dir/vmlinux -iex 'add-auto-load-safe-path \ ./obj-dir' -ex 'target remote localhost:1234' Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rw-r--r--kernel/configs/qemu-gdb.config7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/configs/qemu-gdb.config b/kernel/configs/qemu-gdb.config
new file mode 100644
index 000000000000..30465905ff93
--- /dev/null
+++ b/kernel/configs/qemu-gdb.config
@@ -0,0 +1,7 @@
+# Enable debug info for gdb
+# CONFIG_COMPILE_TEST is not set
+CONFIG_DEBUG_INFO=y
+CONFIG_GDB_SCRIPTS=y
+
+# Easier to debug
+# CONFIG_RANDOMIZE_BASE is not set