diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-20 23:09:20 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-20 23:09:20 +0100 |
commit | 192c891e562da3575d94103cf839997918b1b1a5 (patch) | |
tree | 370f4797849c9dd62e353355344728f60a906201 /tools/source/debug | |
parent | 9abbe475a491631d77199a511382b39b748926a0 (diff) |
debuglevels: #i116845# replace the 'CoreDump' output channel for assertions with 'Debug'
The former was implemented on Windows only, and then effectively the same as the 'Debugger' option.
So, it was removed in favour of a new 'Abort' channel which, well, aborts when an assertion fires.
Diffstat (limited to 'tools/source/debug')
-rw-r--r-- | tools/source/debug/debug.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index fd6f499b4036..acdb7a291026 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -152,6 +152,7 @@ struct DebugData DbgPrintLine pDbgPrintMsgBox; DbgPrintLine pDbgPrintWindow; DbgPrintLine pDbgPrintTestTool; + DbgPrintLine pDbgAbort; ::std::vector< DbgPrintLine > aDbgPrintUserChannels; PointerList* pProfList; @@ -163,9 +164,10 @@ struct DebugData DebugData() :bInit( sal_False ) - ,pDbgPrintMsgBox( sal_False ) + ,pDbgPrintMsgBox( NULL ) ,pDbgPrintWindow( NULL ) ,pDbgPrintTestTool( NULL ) + ,pDbgAbort( NULL ) ,pProfList( NULL ) ,pXtorList( NULL ) ,pDbgTestSolarMutex( NULL ) @@ -420,7 +422,7 @@ namespace { const sal_Char* names[ DBG_OUT_COUNT ] = { - "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "coredump" + "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "abort" }; lcl_writeConfigString( _pFile, _pKeyName, names[ _nValue ] ); } @@ -475,7 +477,7 @@ namespace { const sal_Char* names[ DBG_OUT_COUNT ] = { - "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "coredump" + "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "abort" }; sal_Char aBuf[20]; size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) ); @@ -1199,6 +1201,10 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam ) pDebugData->pDbgPrintTestTool = (DbgPrintLine)(long)pParam; break; + case DBG_FUNC_SET_ABORT: + pDebugData->pDbgAbort = (DbgPrintLine)(long)pParam; + break; + case DBG_FUNC_SAVEDATA: { const DbgData* pData = static_cast< const DbgData* >( pParam ); @@ -1706,10 +1712,12 @@ void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sa nOut = DBG_OUT_DEBUGGER; } - if ( nOut == DBG_OUT_COREDUMP ) + if ( nOut == DBG_OUT_ABORT ) { - if ( !ImplCoreDump() ) - nOut = DBG_OUT_DEBUGGER; + if ( pData->pDbgAbort != NULL ) + pData->pDbgAbort( aBufOut ); + abort(); + nOut = DBG_OUT_DEBUGGER; } if ( nOut == DBG_OUT_DEBUGGER ) |