summaryrefslogtreecommitdiffstats
path: root/debug.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-29 08:35:26 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-29 08:35:26 +0000
commit8b73362a4a88aaa3642db398d17e65eab871d9ed (patch)
tree8a0d6b8de07781a347a081cb876e9868016ee627 /debug.h
parent16bf2379c0400f72cba72063b3f2edce14236f34 (diff)
downloadrsyslog-8b73362a4a88aaa3642db398d17e65eab871d9ed.tar.gz
rsyslog-8b73362a4a88aaa3642db398d17e65eab871d9ed.tar.xz
rsyslog-8b73362a4a88aaa3642db398d17e65eab871d9ed.zip
- improved debug support a bit (assertions)
- restructured code, moved some part out of syslogd.c to action.c, where they belong (still some more to do in that regard ;))
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/debug.h b/debug.h
index 19e91350..9c28eca1 100644
--- a/debug.h
+++ b/debug.h
@@ -99,9 +99,11 @@ void dbgPrintAllDebugInfo(void);
#ifdef RTINST
# define BEGINfunc static dbgFuncDB_t dbgFuncDB=dbgFuncDB_t_INITIALIZER; int dbgCALLStaCK_POP_POINT = dbgEntrFunc(&dbgFuncDB,__LINE__);
# define ENDfunc dbgExitFunc(&dbgFuncDB, dbgCALLStaCK_POP_POINT);
+# define ASSERT(x) do { if(!(x)) dbgPrintAllDebugInfo(); assert(x); } while(0);
#else
# define BEGINfunc
# define ENDfunc
+# define ASSERT(x)
#endif
#ifdef RTINST
# define RUNLOG dbgSetExecLocation(dbgCALLStaCK_POP_POINT, __LINE__); dbgprintf("%s:%d: %s: log point\n", __FILE__, __LINE__, __func__)