Closed nickdesaulniers closed 4 years ago
Perhaps a comment somewhere could be nice as a remainder.
I wonder if I can extend vmlinux-gdb.py to warn if the kernel was booted with KASLR that it's basically not going to work for any debugging.
@nickdesaulniers That would be way better, yeah!
There's only so many places the kernel can be in memory. It shouldn't be too hard to search quickly for the correct KASLR base. What is the right way to update gdb's sense of the base address, though, once its has been located?
I was pulling my hair out trying to debug https://github.com/ClangBuiltLinux/linux/issues/852 since breakpoints I set were never hit.
Sami Tolvanen (@samitolvanen) reminded me I need to disable KASLR via nokaslr kernel command line parameter.
Separate out the -append string from QEMU_ARCH_ARGS, since we need to change it both for interactive and debug mode.