aboutsummaryrefslogtreecommitdiff
path: root/include/common/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/common/debug.h')
-rw-r--r--include/common/debug.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/common/debug.h b/include/common/debug.h
index e4fa31e..522b4df 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -56,11 +56,16 @@
/* For the moment this Panic function is very basic, Report an error and
* spin. This can be expanded in the future to provide more information.
*/
-static inline void __attribute__((noreturn)) panic(void)
-{
- ERROR("PANIC\n");
- while (1)
- ;
-}
+#if DEBUG
+extern void __dead2 do_panic(const char *file, int line);
+#define panic() do_panic(__FILE__, __LINE__)
+
+#else
+extern void __dead2 do_panic(void);
+#define panic() do_panic()
+
+#endif
+
+extern void print_string_value(char *s, unsigned long *mem);
#endif /* __DEBUG_H__ */