lkml.org 
[lkml]   [2018]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 1/3] config: provide a fragment to enable gdb for qemu
    Date
    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>
    ---
    kernel/configs/qemu-gdb.config | 7 +++++++
    1 file changed, 7 insertions(+)
    create mode 100644 kernel/configs/qemu-gdb.config

    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
    --
    2.19.2
    \
     
     \ /
      Last update: 2018-12-13 13:30    [W:3.281 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site