On 20.09.2010 20:58, Maurus Cuelenaere wrote:
Modified: trunk/firmware/export/debug.h
===================================================================
--- trunk/firmware/export/debug.h       2010-09-20 17:09:55 UTC (rev 28124)
+++ trunk/firmware/export/debug.h       2010-09-20 17:38:47 UTC (rev 28125)
@@ -33,13 +33,10 @@
  #ifdef __GNUC__

  /*  */
-#if defined(SIMULATOR)&&  !defined(__PCTOOL__)
+#if (SIMULATOR)&&  !defined(__PCTOOL__) \
+    || ((CONFIG_PLATFORM&  PLATFORM_ANDROID)&&  defined(DEBUG))
  #define DEBUGF  debugf
  #define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__)
Another way of doing this could be (not sure if we have a STRINGIFY macro):
#define LDEBUGF(fmt, ...) DEBUGF(__FILE__ ":" STRINGIFY(__LINE__) " " fmt,     \
                                  __VA_ARGS__)

That way there's no need for the separate ldebugf() function and buffer.

That doesn't work when fmt is not a string literal. But I don't feel
strong, I've never used LDEBUGF myself and the only occurrences are in
code Android doesn't compile.

Best regards.

Reply via email to