diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 10:30:06 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 10:30:06 +0000 |
commit | 545346e697fe930b8b7b9bd0ede47890b26a4832 (patch) | |
tree | d0cfea13a087e00238107347dd3ffb7b9e20f31e /debug.c | |
parent | 89fac41d646711e40a0549dfc197cdd7a7d5f18c (diff) | |
download | rsyslog-545346e697fe930b8b7b9bd0ede47890b26a4832.tar.gz rsyslog-545346e697fe930b8b7b9bd0ede47890b26a4832.tar.xz rsyslog-545346e697fe930b8b7b9bd0ede47890b26a4832.zip |
- changed modules.c calling conventions to be interface-based
- moved module loader from conf.c to module.c, where it belongs
- made the necessary plumbing to auto-load library modules
- upgraded debug system to include iRet in function exit message
- changed module interface so that instances need only to be supported by
output plugins (if we actually need them for input plugins, we can
always add it again...)
- milestone: first implementation of library modules (but do not get
unloaded on exit/hup so far)
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -965,7 +965,7 @@ int dbgEntrFunc(dbgFuncDB_t *pFuncDB, int line) /* handler called when a function is exited */ -void dbgExitFunc(dbgFuncDB_t *pFuncDB, int iStackPtrRestore) +void dbgExitFunc(dbgFuncDB_t *pFuncDB, int iStackPtrRestore, int iRet) { dbgThrdInfo_t *pThrd = dbgGetThrdInfo(); @@ -974,8 +974,12 @@ void dbgExitFunc(dbgFuncDB_t *pFuncDB, int iStackPtrRestore) assert(pFuncDB->magic == dbgFUNCDB_MAGIC); dbgFuncDBPrintActiveMutexes(pFuncDB, "WARNING: mutex still owned by us as we exit function, mutex: ", pthread_self()); - if(bLogFuncFlow && dbgPrintNameIsInList((const uchar*)pFuncDB->file, printNameFileRoot)) - dbgprintf("%s:%d: %s: exit\n", pFuncDB->file, pFuncDB->line, pFuncDB->func); + if(bLogFuncFlow && dbgPrintNameIsInList((const uchar*)pFuncDB->file, printNameFileRoot)) { + if(iRet == RS_RET_NO_IRET) + dbgprintf("%s:%d: %s: exit: (no iRet)\n", pFuncDB->file, pFuncDB->line, pFuncDB->func); + else + dbgprintf("%s:%d: %s: exit: %d\n", pFuncDB->file, pFuncDB->line, pFuncDB->func, iRet); + } pThrd->stackPtr = iStackPtrRestore; if(pThrd->stackPtr < 0) { dbgprintf("Stack pointer for thread %lx below 0 - resetting (some RETiRet still wrong!)\n", pthread_self()); |