/SPARTAN/trunk/Makefile.config |
---|
23,7 → 23,7 |
# Deadlock detection support for spinlocks |
# |
CONFIG_DEBUG = n |
CONFIG_DEBUG = y |
CONFIG_DEBUG_SPINLOCK = y |
## Run-time configuration directives |
/SPARTAN/trunk/generic/include/panic.h |
---|
29,7 → 29,7 |
#ifndef __PANIC_H__ |
#define __PANIC_H__ |
#ifndef NDEBUG |
#ifdef CONFIG_DEBUG |
# define panic(format, ...) panic_printf("Kernel panic in %s() at %s on line %d: " format, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__); |
#else |
# define panic(format, ...) panic_printf("Kernel panic: " format, ##__VA_ARGS__); |
/SPARTAN/trunk/generic/include/debug.h |
---|
34,7 → 34,7 |
/** Debugging ASSERT macro |
* |
* If NDEBUG is not set, the ASSERT() macro |
* If CONFIG_DEBUG is set, the ASSERT() macro |
* evaluates expr and if it is false raises |
* kernel panic. |
* |
41,7 → 41,7 |
* @param expr Expression which is expected to be true. |
* |
*/ |
#ifndef NDEBUG |
#ifdef CONFIG_DEBUG |
# define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s)", #expr); } |
#else |
# define ASSERT(expr) |
/SPARTAN/trunk/Makefile |
---|
62,8 → 62,8 |
include arch/$(ARCH)/Makefile.inc |
include genarch/Makefile.inc |
ifeq ($(CONFIG_DEBUG),n) |
DEFS += -DNDEBUG |
ifeq ($(CONFIG_DEBUG),y) |
DEFS += -DCONFIG_DEBUG |
endif |
ifeq ($(CONFIG_DEBUG_SPINLOCK),y) |
DEFS += -DCONFIG_DEBUG_SPINLOCK |