Meta: Disable KASLR when debugging the kernel with GDB

This lets GDB resolve the kernel symbols correctly.
This commit is contained in:
Idan Horowitz 2022-03-25 00:03:32 +02:00 committed by Linus Groh
commit 45c5fcf5cb
Notes: sideshowbarker 2024-07-17 16:48:12 +09:00

View file

@ -464,6 +464,8 @@ elif [ "$CMD" = "__tmux_cmd" ]; then
fi
# We need to make sure qemu doesn't start until we continue in gdb
export SERENITY_EXTRA_QEMU_ARGS="${SERENITY_EXTRA_QEMU_ARGS} -d int -no-reboot -no-shutdown -S"
# We need to disable kaslr to let gdb map the kernel symbols correctly
export SERENITY_KERNEL_CMDLINE="${SERENITY_KERNEL_CMDLINE} disable_kaslr"
set_tmux_title 'qemu'
build_target run
elif [ "$CMD" = "gdb" ]; then