Index: kernel/generic/include/debug.h
===================================================================
--- kernel/generic/include/debug.h	(revision b83ba8179c33ad85d30d6e84e46f3d415ecd02d1)
+++ kernel/generic/include/debug.h	(revision dbd5df1bf8c369a2f0baa56e369ca2acf995f1f9)
@@ -39,10 +39,16 @@
 #include <arch/debug.h>
 
-#define CALLER ((uintptr_t) __builtin_return_address(0))
+#define CALLER  ((uintptr_t) __builtin_return_address(0))
+
 
 #ifndef HERE
+
 /** Current Instruction Pointer address */
-#	define HERE ((uintptr_t *) 0)
-#endif
+#define HERE ((uintptr_t *) 0)
+
+#endif /* HERE */
+
+
+#ifdef CONFIG_DEBUG
 
 /** Debugging ASSERT macro
@@ -55,12 +61,34 @@
  *
  */
-#ifdef CONFIG_DEBUG
-#	define ASSERT(expr) \
-		if (!(expr)) { \
-			panic("Assertion failed (%s), caller=%p.", #expr, CALLER); \
-		}
-#else
-#	define ASSERT(expr)
-#endif
+#define ASSERT(expr) \
+	if (!(expr)) { \
+		panic("Assertion failed (%s), caller=%p.", #expr, CALLER); \
+	}
+
+/** Debugging verbose ASSERT macro
+ *
+ * If CONFIG_DEBUG is set, the ASSERT() macro
+ * evaluates expr and if it is false raises
+ * kernel panic. The panic message contains also
+ * the supplied message.
+ *
+ * @param expr Expression which is expected to be true.
+ * @param msg  Additional message to show (string).
+ *
+ */
+#define ASSERT_VERBOSE(expr, msg) \
+	if (!(expr)) { \
+		panic("Assertion failed (%s, %s), caller=%p.", #expr, msg, CALLER); \
+	}
+
+#else /* CONFIG_DEBUG */
+
+#define ASSERT(expr)
+#define ASSERT_VERBOSE(expr, msg)
+
+#endif /* CONFIG_DEBUG */
+
+
+#ifdef CONFIG_LOG
 
 /** Extensive logging output macro
@@ -71,12 +99,7 @@
  *
  */
-
-#ifdef CONFIG_LOG
-#	define LOG(format, ...) \
-		printf("%s() at %s:%u: " format "\n", __func__, __FILE__, \
-		    __LINE__, ##__VA_ARGS__);
-#else
-#	define LOG(format, ...)
-#endif
+#define LOG(format, ...) \
+	printf("%s() at %s:%u: " format "\n", __func__, __FILE__, \
+	    __LINE__, ##__VA_ARGS__);
 
 /** Extensive logging execute macro
@@ -87,16 +110,17 @@
  *
  */
+#define LOG_EXEC(fnc) \
+	{ \
+		printf("%s() at %s:%u: " #fnc "\n", __func__, __FILE__, \
+		    __LINE__); \
+		fnc; \
+	}
+	
+#else /* CONFOG_LOG */
 
-#ifdef CONFIG_LOG
-#	define LOG_EXEC(fnc) \
-		{ \
-			printf("%s() at %s:%u: " #fnc "\n", __func__, __FILE__, \
-			    __LINE__); \
-			fnc; \
-		}
-#else
-#	define LOG_EXEC(fnc) fnc
-#endif
+#define LOG(format, ...)
+#define LOG_EXEC(fnc) fnc
 
+#endif /* CONFOG_LOG */
 
 #endif
