Always print file and line number in panic/unreachable macros
Release builds used to have a special variant of these macros without
the source code location information. This kind of mechanism is useful
when writing software that needs both a development and production
version so that the source code information is not leaked when the
device is in the field.
However, in the context of TF-A Tests, it makes little sense, as it's
unlikely somebody would ever ship a device with TF-A Tests installed
on it.
Change-Id: Ic14ad87c2756762807ee71142f21d6973233144e
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
diff --git a/include/common/debug.h b/include/common/debug.h
index 216c53d..53eebf7 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -66,23 +66,13 @@
#endif
/*
- * For the moment this Panic function is very basic, Report an error and
+ * 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.
*/
-#if DEBUG
void __attribute__((__noreturn__)) do_panic(const char *file, int line);
#define panic() do_panic(__FILE__, __LINE__)
void __attribute__((__noreturn__)) do_bug_unreachable(const char *file, int line);
#define bug_unreachable() do_bug_unreachable(__FILE__, __LINE__)
-#else
-void __attribute__((__noreturn__)) do_panic(void);
-#define panic() do_panic()
-
-void __attribute__((__noreturn__)) do_bug_unreachable(void);
-#define bug_unreachable() do_bug_unreachable()
-
-#endif
-
#endif /* __DEBUG_H__ */