diff options
author | Andrew Kaster <andrewdkaster@gmail.com> | 2021-05-23 14:20:22 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-27 10:21:30 +0200 |
commit | dda8afcb9032b852b612971df2c116f916971c66 (patch) | |
tree | 5915a64a4bf1ff112b92e6cf3af74240a7beceec /CMakeLists.txt | |
parent | 7fb05c5c2343b2e1b9d874cfc03c29af4f7a2a1f (diff) | |
download | serenity-dda8afcb9032b852b612971df2c116f916971c66.zip |
Kernel: Add ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS option to set Og and ggdb3
When debugging kernel code, it's necessary to set extra flags. Normal
advice is to set -ggdb3. Sometimes that still doesn't provide enough
debugging information for complex functions that still get optimized.
Compiling with -Og gives the best optimizations for debugging, but can
sometimes be broken by changes that are innocuous when the compiler gets
more of a chance to look at them. The new CMake option enables both
compile options for kernel code.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df038c2070..f2fcdeea10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ option(ENABLE_KERNEL_ADDRESS_SANITIZER "Enable kernel address sanitizer testing option(ENABLE_MEMORY_SANITIZER "Enable memory sanitizer testing in gcc/clang" OFF) option(ENABLE_UNDEFINED_SANITIZER "Enable undefined behavior sanitizer testing in gcc/clang" OFF) option(ENABLE_FUZZER_SANITIZER "Enable fuzzer sanitizer testing in clang" OFF) +option(ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS "Enable -Og and -ggdb3 options for Kernel code for easier debugging" OFF) option(ENABLE_ALL_THE_DEBUG_MACROS "Enable all debug macros to validate they still compile" OFF) option(ENABLE_COMPILETIME_FORMAT_CHECK "Enable compiletime format string checks" ON) option(ENABLE_PCI_IDS_DOWNLOAD "Enable download of the pci.ids database at build time" ON) |