diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-23 11:56:38 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-23 11:56:38 +0000 |
commit | a43cae1e3850632c3bf4cf7c2b48a7c3f90bce31 (patch) | |
tree | e5ae5d4d0bf4d5072debaee2c70dd68d2344000c /debug.h | |
parent | 4604f73f46cee99988fb8ba0083599b835066ff9 (diff) | |
download | rsyslog-a43cae1e3850632c3bf4cf7c2b48a7c3f90bce31.tar.gz rsyslog-a43cae1e3850632c3bf4cf7c2b48a7c3f90bce31.tar.xz rsyslog-a43cae1e3850632c3bf4cf7c2b48a7c3f90bce31.zip |
bug fixes and improvements
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -41,19 +41,19 @@ int dbgCondWait(pthread_cond_t *cond, pthread_mutex_t *mutex, const char *file, int dbgMutexUnlock(pthread_mutex_t *pmut, const char *file, const char* func, int line); int dbgMutexLock(pthread_mutex_t *pmut, const char *file, const char* func, int line); void dbgprintf(char *fmt, ...) __attribute__((format(printf,1, 2))); -void dbgEntrFunc(char* file, int line, const char* func); -void dbgExitFunc(char* file, int line, const char* func); +int dbgEntrFunc(char* file, int line, const char* func); +void dbgExitFunc(int iStackPtrRestore, char* file, int line, const char* func); /* macros */ #if 1 /* DEV debug: set to 1 to get a rough call trace -- rgerhards, 2008-01-13 */ -# define BEGINfunc dbgEntrFunc(__FILE__, __LINE__, __func__); -# define ENDfunc dbgExitFunc(__FILE__, __LINE__, __func__); +# define BEGINfunc int dbgCALLStaCK_POP_POINT = dbgEntrFunc(__FILE__, __LINE__, __func__); +# define ENDfunc dbgExitFunc(dbgCALLStaCK_POP_POINT, __FILE__, __LINE__, __func__); #else # define BEGINfunc # define ENDfunc #endif #if 1 /* DEV debug: set to 1 to enable -- rgerhards, 2008-01-13 */ -# define RUNLOG dbgprintf("%s:%d: %s: log point\n", __FILE__, __LINE__, __func__) +# define RUNLOG dbgprintf("%s:%d: %s: log point\n", __FILE__, __LINE__, __func__) # define RUNLOG_VAR(fmt, x) dbgprintf("%s:%d: %s: var '%s'[%s]: " fmt "\n", __FILE__, __LINE__, __func__, #x, fmt, x) #else # define RUNLOG @@ -69,7 +69,7 @@ void dbgExitFunc(char* file, int line, const char* func); /* debug aides */ #if 1 #define d_pthread_mutex_lock(x) dbgMutexLock(x, __FILE__, __func__, __LINE__) -#define d_pthread_mutex_unlock(x) dbgMutexLock(x, __FILE__, __func__, __LINE__) +#define d_pthread_mutex_unlock(x) dbgMutexUnlock(x, __FILE__, __func__, __LINE__) #define d_pthread_cond_wait(cond, mut) dbgCondWait(cond, mut, __FILE__, __func__, __LINE__) #define d_pthread_cond_timedwait(cond, mut, to) dbgCondTimedWait(cond, mut, to, __FILE__, __func__, __LINE__) #else |