[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v5 1/6] build: convert debug to Kconfig

Enabling debug will disable NDEBUG which will result in more debug
prints.  There are a number of debugging options for Xen so place the
debug option under a menu for different debugging options to have a way
to group them all together.

Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
 xen/Kconfig              |  2 ++
 xen/Kconfig.debug        | 14 ++++++++++++++
 xen/Rules.mk             |  5 +++--
 xen/include/xen/config.h |  4 ++++
 4 files changed, 23 insertions(+), 2 deletions(-)
 create mode 100644 xen/Kconfig.debug

diff --git a/xen/Kconfig b/xen/Kconfig
index fa8b27c..0fe7a1a 100644
--- a/xen/Kconfig
+++ b/xen/Kconfig
@@ -26,3 +26,5 @@ config DEFCONFIG_LIST
 config EXPERT
        option env="XEN_CONFIG_EXPERT"
+source "Kconfig.debug"
diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
new file mode 100644
index 0000000..796af0c
--- /dev/null
+++ b/xen/Kconfig.debug
@@ -0,0 +1,14 @@
+menu "Debugging Options"
+config DEBUG
+       bool "Developer Checks"
+       default y
+       ---help---
+         If you say Y here this will enable developer checks such as asserts
+         and extra printks. This option is intended for development purposes
+         only, and not for production use.
+         You probably want to say 'N' here.
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 961d533..da2f490 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -20,13 +20,14 @@ include $(XEN_ROOT)/Config.mk
 ifeq ($(debug),y)
 verbose       := y
 frame_pointer := y
 ifeq ($(perfc_arrays),y)
 perfc := y
+ifeq ($(origin debug),command line)
+$(warning "You must use 'make menuconfig' to enable/disable debug now.")
 ifneq ($(origin kexec),undefined)
 $(error "You must use 'make menuconfig' to enable/disable kexec now.")
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index ef6e5ee..473c5e8 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -81,4 +81,8 @@
 /* allow existing code to work with Kconfig variable */
+#define NDEBUG
 #endif /* __XEN_CONFIG_H__ */

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.