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@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
config EXPERT
string
option env="XEN_CONFIG_EXPERT"
+
+source "Kconfig.debug"
--- /dev/null
+
+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.
+
+endmenu
ifeq ($(debug),y)
verbose := y
frame_pointer := y
-else
-CFLAGS += -DNDEBUG
endif
ifeq ($(perfc_arrays),y)
perfc := y
endif
+ifeq ($(origin debug),command line)
+$(warning "You must use 'make menuconfig' to enable/disable debug now.")
+endif
ifneq ($(origin kexec),undefined)
$(error "You must use 'make menuconfig' to enable/disable kexec now.")
endif
/* allow existing code to work with Kconfig variable */
#define NR_CPUS CONFIG_NR_CPUS
+#ifndef CONFIG_DEBUG
+#define NDEBUG
+#endif
+
#endif /* __XEN_CONFIG_H__ */