From 545346e697fe930b8b7b9bd0ede47890b26a4832 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 5 Mar 2008 10:30:06 +0000 Subject: - 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) --- debug.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'debug.c') diff --git a/debug.c b/debug.c index f8a8841c..eb557be4 100644 --- a/debug.c +++ b/debug.c @@ -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()); -- cgit v1.2.3