tools headers UAPI: Sync linux/kvm.h with the kernel sources
[linux-2.6-microblaze.git] / lib / Kconfig.debug
index 5ea0c17..2779c29 100644 (file)
@@ -256,14 +256,51 @@ config DEBUG_INFO_SPLIT
          to know about the .dwo files and include them.
          Incompatible with older versions of ccache.
 
+choice
+       prompt "DWARF version"
+       help
+         Which version of DWARF debug info to emit.
+
+config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
+       bool "Rely on the toolchain's implicit default DWARF version"
+       help
+         The implicit default version of DWARF debug info produced by a
+         toolchain changes over time.
+
+         This can break consumers of the debug info that haven't upgraded to
+         support newer revisions, and prevent testing newer versions, but
+         those should be less common scenarios.
+
+         If unsure, say Y.
+
 config DEBUG_INFO_DWARF4
-       bool "Generate dwarf4 debuginfo"
-       depends on $(cc-option,-gdwarf-4)
+       bool "Generate DWARF Version 4 debuginfo"
+       help
+         Generate DWARF v4 debug info. This requires gcc 4.5+ and gdb 7.0+.
+
+         If you have consumers of DWARF debug info that are not ready for
+         newer revisions of DWARF, you may wish to choose this or have your
+         config select this.
+
+config DEBUG_INFO_DWARF5
+       bool "Generate DWARF Version 5 debuginfo"
+       depends on GCC_VERSION >= 50000 || CC_IS_CLANG
+       depends on CC_IS_GCC || $(success,$(srctree)/scripts/test_dwarf5_support.sh $(CC) $(CLANG_FLAGS))
+       depends on !DEBUG_INFO_BTF
        help
-         Generate dwarf4 debug info. This requires recent versions
-         of gcc and gdb. It makes the debug information larger.
-         But it significantly improves the success of resolving
-         variables in gdb on optimized code.
+         Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
+         5.0+ accepts the -gdwarf-5 flag but only had partial support for some
+         draft features until 7.0), and gdb 8.0+.
+
+         Changes to the structure of debug info in Version 5 allow for around
+         15-18% savings in resulting image and debug info section sizes as
+         compared to DWARF Version 4. DWARF Version 5 standardizes previous
+         extensions such as accelerators for symbol indexing and the format
+         for fission (.dwo/.dwp) files. Users may not want to select this
+         config if they rely on tooling that has not yet been updated to
+         support DWARF Version 5.
+
+endchoice # "DWARF version"
 
 config DEBUG_INFO_BTF
        bool "Generate BTF typeinfo"
@@ -901,6 +938,7 @@ config DEBUG_STACKOVERFLOW
          If in doubt, say "N".
 
 source "lib/Kconfig.kasan"
+source "lib/Kconfig.kfence"
 
 endmenu # "Memory Debugging"