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 /Documentation/BuildInstructions.md | |
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 'Documentation/BuildInstructions.md')
-rw-r--r-- | Documentation/BuildInstructions.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index dd5c70a2cc..5a132b99f1 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -246,6 +246,7 @@ There are some optional features that can be enabled during compilation that are - `ENABLE_MEMORY_SANITIZER`: enables runtime checks for uninitialized memory accesses in Lagom test cases. - `ENABLE_UNDEFINED_SANITIZER`: builds in runtime checks for [undefined behavior](https://en.wikipedia.org/wiki/Undefined_behavior) (like null pointer dereferences and signed integer overflows) in Lagom test cases. - `ENABLE_FUZZER_SANITIZER`: builds [fuzzers](https://en.wikipedia.org/wiki/Fuzzing) for various parts of the system. +- `ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS`: sets -Og and -ggdb3 compile options for building the Kernel. Allows for easier debugging of Kernel code. By default, the Kernel is built with -Os instead. - `ENABLE_ALL_THE_DEBUG_MACROS`: used for checking whether debug code compiles on CI. This should not be set normally, as it clutters the console output and makes the system run very slowly. Instead, enable only the needed debug macros, as described below. - `ENABLE_COMPILETIME_FORMAT_CHECK`: checks for the validity of `std::format`-style format string during compilation. Enabled by default. - `ENABLE_PCI_IDS_DOWNLOAD`: downloads the [`pci.ids` database](https://pci-ids.ucw.cz/) that contains information about PCI devices at build time, if not already present. Enabled by default. |