summaryrefslogtreecommitdiffstats
path: root/firmware/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/debug.c')
-rw-r--r--firmware/debug.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/debug.c b/firmware/debug.c
index 83eb149706..2ebcd86778 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -195,7 +195,9 @@ static void debug(char *msg)
}
#endif /* end of DEBUG section */
+#ifdef __GNUC__
void debugf(char *fmt, ...)
+#endif
{
#ifdef DEBUG
va_list ap;
@@ -223,4 +225,13 @@ void debugf(char *fmt, ...)
vfprintf( stderr, fmt, ap );
va_end( ap );
}
+
+void ldebugf(char* file, int line, char *fmt, ...)
+{
+ va_list ap;
+ va_start( ap, fmt );
+ fprintf( stderr, "%s:%d ", file, line );
+ vfprintf( stderr, fmt, ap );
+ va_end( ap );
+}
#endif