From c79c8c322925710d0954b82043ee0ec758440cb2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 17 Oct 2013 16:10:33 +0200 Subject: [PATCH] Added DBG_SPOT macro --- ucw/lib.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ucw/lib.h b/ucw/lib.h index e7518def..c673fb7b 100644 --- a/ucw/lib.h +++ b/ucw/lib.h @@ -146,8 +146,14 @@ void assert_failed_noinfo(void) NONRET; #ifdef LOCAL_DEBUG #define DBG(x,y...) msg(L_DEBUG, x,##y) /** If `LOCAL_DEBUG` is defined before including , log a debug message. Otherwise do nothing. **/ +/** + * If `LOCAL_DEBUG` is defined before including , log current + * file name and line number. Otherwise do nothing. + **/ +#define DBG_SPOT msg(L_DEBUG, "%s:%d (%s)", __FILE__, __LINE__, __func__) #else #define DBG(x,y...) do { } while(0) +#define DBG_SPOT do { } while(0) #endif #ifdef DEBUG_ASSERTS -- 2.39.2