diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 17:03:26 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 17:03:26 +0000 |
commit | 69dc3a4e56777340841c915c2e7c03af5c9ca82c (patch) | |
tree | d44a3f2425087fa5945a33804b14817a93b703ac /debug.h | |
parent | 326a0679e731ab5f2d46ae3b07b9f3f0d378f105 (diff) | |
download | rsyslog-69dc3a4e56777340841c915c2e7c03af5c9ca82c.tar.gz rsyslog-69dc3a4e56777340841c915c2e7c03af5c9ca82c.tar.bz2 rsyslog-69dc3a4e56777340841c915c2e7c03af5c9ca82c.zip |
- improved diagnostic information for abort cases
- some initial effort for malloc/free debugging support
- bugfix: using dynafile actions caused rsyslogd abort
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -91,6 +91,7 @@ int dbgMutexLock(pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD, int ln, int iStackP int dbgMutexUnlock(pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD, int ln, int iStackPtr); int dbgCondWait(pthread_cond_t *cond, pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD, int ln, int iStackPtr); int dbgCondTimedWait(pthread_cond_t *cond, pthread_mutex_t *pmut, const struct timespec *abstime, dbgFuncDB_t *pFuncD, int ln, int iStackPtr); +void dbgFree(void *pMem, dbgFuncDB_t *pFuncDB, int ln, int iStackPtr); int dbgEntrFunc(dbgFuncDB_t *pFuncDB, int line); void dbgExitFunc(dbgFuncDB_t *pFuncDB, int iStackPtrRestore); void dbgSetExecLocation(int iStackPtr, int line); @@ -131,10 +132,12 @@ void dbgPrintAllDebugInfo(void); #define d_pthread_mutex_unlock(x) dbgMutexUnlock(x, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #define d_pthread_cond_wait(cond, mut) dbgCondWait(cond, mut, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #define d_pthread_cond_timedwait(cond, mut, to) dbgCondTimedWait(cond, mut, to, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) +#define d_free(x) dbgFree(x, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #else #define d_pthread_mutex_lock(x) pthread_mutex_lock(x) #define d_pthread_mutex_unlock(x) pthread_mutex_unlock(x) #define d_pthread_cond_wait(cond, mut) pthread_cond_wait(cond, mut) #define d_pthread_cond_timedwait(cond, mut, to) pthread_cond_timedwait(cond, mut, to) +#define d_free(x) free(x) #endif #endif /* #ifndef DEBUG_H_INCLUDED */ |