Index: kernel/generic/include/debug.h
===================================================================
--- kernel/generic/include/debug.h	(revision 419886f690718bde897f3240ef5a5106750673e8)
+++ kernel/generic/include/debug.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
@@ -39,9 +39,9 @@
 #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)
+#	define HERE ((uintptr_t *) 0)
 #endif
 
@@ -56,8 +56,47 @@
  */
 #ifdef CONFIG_DEBUG
-#	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%.*p\n", #expr, sizeof(uintptr_t) * 2, CALLER); }
+#	define ASSERT(expr) \
+		if (!(expr)) { \
+			panic("assertion failed (%s), caller=%p\n", #expr, CALLER); \
+		}
 #else
 #	define ASSERT(expr)
 #endif
+
+/** Extensive debugging output macro
+ *
+ * If CONFIG_EDEBUG is set, the LOG() macro
+ * will print whatever message is indicated plus
+ * an information about the location.
+ *
+ */
+
+#ifdef CONFIG_EDEBUG
+#	define LOG(format, ...) \
+		printf("%s() at %s:%u: " format "\n", __func__, __FILE__, \
+			__LINE__, ##__VA_ARGS__);
+#else
+#	define LOG(format, ...)
+#endif
+
+/** Extensive debugging execute macro
+ *
+ * If CONFIG_EDEBUG is set, the LOG_EXEC() macro
+ * will print an information about calling a given
+ * function and call it.
+ *
+ */
+
+#ifdef CONFIG_EDEBUG
+#	define LOG_EXEC(fnc) \
+		{ \
+			printf("%s() at %s:%u: " #fnc "\n", __func__, __FILE__, \
+			__LINE__); \
+			fnc; \
+		}
+#else
+#	define LOG_EXEC(fnc) fnc
+#endif
+
 
 #endif
Index: kernel/generic/include/panic.h
===================================================================
--- kernel/generic/include/panic.h	(revision 419886f690718bde897f3240ef5a5106750673e8)
+++ kernel/generic/include/panic.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
@@ -37,13 +37,13 @@
 
 #ifdef CONFIG_DEBUG
-#define panic(format, ...) \
-    panic_printf("Kernel panic in %s() at %s on line %d: " format, __func__, \
-    __FILE__, __LINE__, ##__VA_ARGS__);
+#	define panic(format, ...) \
+		panic_printf("Kernel panic in %s() at %s:%u: " format, __func__, \
+		__FILE__, __LINE__, ##__VA_ARGS__);
 #else
-#define panic(format, ...) \
-    panic_printf("Kernel panic: " format, ##__VA_ARGS__);
+#	define panic(format, ...) \
+		panic_printf("Kernel panic: " format, ##__VA_ARGS__);
 #endif
 
-extern void panic_printf(char *fmt, ...) __attribute__((noreturn)) ;
+extern void panic_printf(char *fmt, ...) __attribute__((noreturn));
 
 #endif
