summaryrefslogtreecommitdiff
path: root/firmware/export/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/debug.h')
-rw-r--r--firmware/export/debug.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/firmware/export/debug.h b/firmware/export/debug.h
index b5458af487..3a4a774f42 100644
--- a/firmware/export/debug.h
+++ b/firmware/export/debug.h
@@ -29,16 +29,13 @@ extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2);
29extern void ldebugf(const char* file, int line, const char *fmt, ...) 29extern void ldebugf(const char* file, int line, const char *fmt, ...)
30 ATTRIBUTE_PRINTF(3, 4); 30 ATTRIBUTE_PRINTF(3, 4);
31 31
32#ifndef CODEC 32#ifndef CODEC
33#ifdef __GNUC__
34 33
35/* */
36#if defined(SIMULATOR) && !defined(__PCTOOL__) \ 34#if defined(SIMULATOR) && !defined(__PCTOOL__) \
37 || ((CONFIG_PLATFORM & (PLATFORM_ANDROID|PLATFORM_MAEMO|PLATFORM_PANDORA)) && defined(DEBUG)) 35 || (defined(APPLICATION) && defined(DEBUG))
38#define DEBUGF debugf 36#define DEBUGF debugf
39#define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__) 37#define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__)
40#else 38#elif defined(DEBUG) /* DEBUG on native targets */
41#if defined(DEBUG)
42 39
43#ifdef HAVE_GDB_API 40#ifdef HAVE_GDB_API
44void breakpoint(void); 41void breakpoint(void);
@@ -46,19 +43,13 @@ void breakpoint(void);
46 43
47#define DEBUGF debugf 44#define DEBUGF debugf
48#define LDEBUGF debugf 45#define LDEBUGF debugf
49#else
50#define DEBUGF(...) do { } while(0)
51#define LDEBUGF(...) do { } while(0)
52#endif
53#endif
54 46
47#else /* !DEBUG */
55 48
56#else 49#define DEBUGF(...) do { } while(0)
57 50#define LDEBUGF(...) do { } while(0)
58#define DEBUGF debugf
59#define LDEBUGF debugf
60 51
61#endif /* GCC */ 52#endif /* SIMULATOR && !__PCTOOL__ || APPLICATION && DEBUG */
62 53
63#endif /* CODEC */ 54#endif /* CODEC */
64#endif 55#endif