osl_setDetailedDebugMessageFunc is effectively doing nothing
...since the osl/diagnose.h macros got rebased onto sal/log.hxx, so remove the corresponding tools/debug.h functionality. Change-Id: Ife4b5b1a2608230d0dbfc3fa8852243c89ed292f
This commit is contained in:
@@ -112,11 +112,6 @@ RTLFUNC(CaptureAssertions)
|
|||||||
|
|
||||||
// set the new channel
|
// set the new channel
|
||||||
DBG_INSTOUTERROR( nAssertionChannelId );
|
DBG_INSTOUTERROR( nAssertionChannelId );
|
||||||
|
|
||||||
// ensure OSL assertions are captured, too
|
|
||||||
DbgData aData( *DbgGetData() );
|
|
||||||
aData.bHookOSLAssert = true;
|
|
||||||
DbgUpdateOslHook( &aData );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xAssertionChannelBasic = pBasic;
|
xAssertionChannelBasic = pBasic;
|
||||||
|
@@ -79,7 +79,6 @@ struct DbgData
|
|||||||
bool bOverwrite;
|
bool bOverwrite;
|
||||||
sal_uIntPtr nTraceOut;
|
sal_uIntPtr nTraceOut;
|
||||||
sal_uIntPtr nErrorOut;
|
sal_uIntPtr nErrorOut;
|
||||||
bool bHookOSLAssert;
|
|
||||||
sal_Char aDebugName[260];
|
sal_Char aDebugName[260];
|
||||||
sal_Char aInclFilter[512];
|
sal_Char aInclFilter[512];
|
||||||
sal_Char aExclFilter[512];
|
sal_Char aExclFilter[512];
|
||||||
@@ -108,16 +107,10 @@ struct DbgDataType
|
|||||||
#define DBG_FUNC_SETTESTSOLARMUTEX 14
|
#define DBG_FUNC_SETTESTSOLARMUTEX 14
|
||||||
#define DBG_FUNC_TESTSOLARMUTEX 15
|
#define DBG_FUNC_TESTSOLARMUTEX 15
|
||||||
#define DBG_FUNC_PRINTFILE 16
|
#define DBG_FUNC_PRINTFILE 16
|
||||||
#define DBG_FUNC_UPDATEOSLHOOK 19
|
|
||||||
#define DBG_FUNC_SET_ABORT 20
|
#define DBG_FUNC_SET_ABORT 20
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL );
|
TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL );
|
||||||
|
|
||||||
inline void DbgUpdateOslHook( DbgData* pData )
|
|
||||||
{
|
|
||||||
DbgFunc( DBG_FUNC_UPDATEOSLHOOK, pData );
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DbgDebugStart()
|
inline void DbgDebugStart()
|
||||||
{
|
{
|
||||||
DbgFunc( DBG_FUNC_DEBUGSTART );
|
DbgFunc( DBG_FUNC_DEBUGSTART );
|
||||||
|
@@ -117,9 +117,6 @@ struct DebugData
|
|||||||
PointerList* pProfList;
|
PointerList* pProfList;
|
||||||
PointerList* pXtorList;
|
PointerList* pXtorList;
|
||||||
DbgTestSolarMutexProc pDbgTestSolarMutex;
|
DbgTestSolarMutexProc pDbgTestSolarMutex;
|
||||||
pfunc_osl_printDetailedDebugMessage
|
|
||||||
pOldDebugMessageFunc;
|
|
||||||
bool bOslIsHooked;
|
|
||||||
|
|
||||||
DebugData()
|
DebugData()
|
||||||
:bInit( false )
|
:bInit( false )
|
||||||
@@ -129,8 +126,6 @@ struct DebugData
|
|||||||
,pProfList( NULL )
|
,pProfList( NULL )
|
||||||
,pXtorList( NULL )
|
,pXtorList( NULL )
|
||||||
,pDbgTestSolarMutex( NULL )
|
,pDbgTestSolarMutex( NULL )
|
||||||
,pOldDebugMessageFunc( NULL )
|
|
||||||
,bOslIsHooked( false )
|
|
||||||
{
|
{
|
||||||
aDbgData.nTestFlags = DBG_TEST_RESOURCE;
|
aDbgData.nTestFlags = DBG_TEST_RESOURCE;
|
||||||
aDbgData.bOverwrite = true;
|
aDbgData.bOverwrite = true;
|
||||||
@@ -140,7 +135,6 @@ struct DebugData
|
|||||||
#else
|
#else
|
||||||
aDbgData.nErrorOut = DBG_OUT_MSGBOX;
|
aDbgData.nErrorOut = DBG_OUT_MSGBOX;
|
||||||
#endif
|
#endif
|
||||||
aDbgData.bHookOSLAssert = true;
|
|
||||||
aDbgData.aDebugName[0] = 0;
|
aDbgData.aDebugName[0] = 0;
|
||||||
aDbgData.aInclFilter[0] = 0;
|
aDbgData.aInclFilter[0] = 0;
|
||||||
aDbgData.aExclFilter[0] = 0;
|
aDbgData.aExclFilter[0] = 0;
|
||||||
@@ -631,7 +625,6 @@ static DebugData* GetDebugData()
|
|||||||
lcl_tryReadConfigString( pLine, nLineLength, "exclude_class", aDebugData.aDbgData.aExclClassFilter, sizeof( aDebugData.aDbgData.aExclClassFilter ) );
|
lcl_tryReadConfigString( pLine, nLineLength, "exclude_class", aDebugData.aDbgData.aExclClassFilter, sizeof( aDebugData.aDbgData.aExclClassFilter ) );
|
||||||
lcl_tryReadOutputChannel( pLine, nLineLength, "trace", &aDebugData.aDbgData.nTraceOut );
|
lcl_tryReadOutputChannel( pLine, nLineLength, "trace", &aDebugData.aDbgData.nTraceOut );
|
||||||
lcl_tryReadOutputChannel( pLine, nLineLength, "error", &aDebugData.aDbgData.nErrorOut );
|
lcl_tryReadOutputChannel( pLine, nLineLength, "error", &aDebugData.aDbgData.nErrorOut );
|
||||||
lcl_tryReadConfigBoolean( pLine, nLineLength, "oslhook", &aDebugData.aDbgData.bHookOSLAssert );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// elements of the [gui] section
|
// elements of the [gui] section
|
||||||
@@ -809,23 +802,10 @@ static bool ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C"
|
|
||||||
void SAL_CALL dbg_printOslDebugMessage( const sal_Char * pszFileName, sal_Int32 nLine, const sal_Char * pszMessage )
|
|
||||||
{
|
|
||||||
DbgOut( pszMessage ? pszMessage : "assertion failed!", DBG_OUT_ERROR, pszFileName, (sal_uInt16)nLine );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void DebugInit()
|
static void DebugInit()
|
||||||
{
|
{
|
||||||
bDbgImplInMain = true;
|
bDbgImplInMain = true;
|
||||||
ImplDbgInitLock();
|
ImplDbgInitLock();
|
||||||
|
|
||||||
DebugData* pData = GetDebugData();
|
|
||||||
if( pData->aDbgData.bHookOSLAssert && ! pData->bOslIsHooked )
|
|
||||||
{
|
|
||||||
pData->pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &dbg_printOslDebugMessage );
|
|
||||||
pData->bOslIsHooked = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DebugDeInit()
|
static void DebugDeInit()
|
||||||
@@ -835,12 +815,6 @@ static void DebugDeInit()
|
|||||||
sal_uIntPtr nCount;
|
sal_uIntPtr nCount;
|
||||||
sal_uIntPtr nOldOut;
|
sal_uIntPtr nOldOut;
|
||||||
|
|
||||||
if( pData->bOslIsHooked )
|
|
||||||
{
|
|
||||||
osl_setDetailedDebugMessageFunc( pData->pOldDebugMessageFunc );
|
|
||||||
pData->bOslIsHooked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output statistics trace data to file
|
// Output statistics trace data to file
|
||||||
nOldOut = pData->aDbgData.nTraceOut;
|
nOldOut = pData->aDbgData.nTraceOut;
|
||||||
pData->aDbgData.nTraceOut = DBG_OUT_FILE;
|
pData->aDbgData.nTraceOut = DBG_OUT_FILE;
|
||||||
@@ -895,7 +869,6 @@ static void DebugDeInit()
|
|||||||
pData->aDbgData.nTestFlags &= DBG_TEST_PROFILING;
|
pData->aDbgData.nTestFlags &= DBG_TEST_PROFILING;
|
||||||
pData->aDbgPrintUserChannels.clear();
|
pData->aDbgPrintUserChannels.clear();
|
||||||
pData->pDbgPrintWindow = NULL;
|
pData->pDbgPrintWindow = NULL;
|
||||||
pData->pOldDebugMessageFunc = NULL;
|
|
||||||
ImplDbgDeInitLock();
|
ImplDbgDeInitLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1056,7 +1029,6 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
|
|||||||
lcl_writeConfigString( pIniFile, "exclude_class", pData->aExclClassFilter );
|
lcl_writeConfigString( pIniFile, "exclude_class", pData->aExclClassFilter );
|
||||||
lcl_writeConfigOutChannel( pIniFile, "trace", pData->nTraceOut );
|
lcl_writeConfigOutChannel( pIniFile, "trace", pData->nTraceOut );
|
||||||
lcl_writeConfigOutChannel( pIniFile, "error", pData->nErrorOut );
|
lcl_writeConfigOutChannel( pIniFile, "error", pData->nErrorOut );
|
||||||
lcl_writeConfigBoolean( pIniFile, "oslhook", pData->bHookOSLAssert );
|
|
||||||
|
|
||||||
lcl_lineFeed( pIniFile );
|
lcl_lineFeed( pIniFile );
|
||||||
lcl_startSection( pIniFile, eGUI );
|
lcl_startSection( pIniFile, eGUI );
|
||||||
@@ -1107,22 +1079,6 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
|
|||||||
case DBG_FUNC_PRINTFILE:
|
case DBG_FUNC_PRINTFILE:
|
||||||
ImplDbgPrintFile( (const sal_Char*)pParam );
|
ImplDbgPrintFile( (const sal_Char*)pParam );
|
||||||
break;
|
break;
|
||||||
case DBG_FUNC_UPDATEOSLHOOK:
|
|
||||||
{
|
|
||||||
const DbgData* pData = static_cast< const DbgData* >( pParam );
|
|
||||||
pDebugData->aDbgData.bHookOSLAssert = pData->bHookOSLAssert;
|
|
||||||
if( pDebugData->bOslIsHooked && ! pData->bHookOSLAssert )
|
|
||||||
{
|
|
||||||
osl_setDetailedDebugMessageFunc( pDebugData->pOldDebugMessageFunc );
|
|
||||||
pDebugData->bOslIsHooked = false;
|
|
||||||
}
|
|
||||||
else if( ! pDebugData->bOslIsHooked && pData->bHookOSLAssert )
|
|
||||||
{
|
|
||||||
pDebugData->pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &dbg_printOslDebugMessage );
|
|
||||||
pDebugData->bOslIsHooked = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -390,7 +390,6 @@ private:
|
|||||||
ListBox maTraceBox;
|
ListBox maTraceBox;
|
||||||
FixedText maErrorText;
|
FixedText maErrorText;
|
||||||
ListBox maErrorBox;
|
ListBox maErrorBox;
|
||||||
CheckBox maHookOSLBox;
|
|
||||||
GroupBox maBox4;
|
GroupBox maBox4;
|
||||||
|
|
||||||
OKButton maOKButton;
|
OKButton maOKButton;
|
||||||
@@ -574,7 +573,6 @@ DbgDialog::DbgDialog() :
|
|||||||
maTraceBox( this, WB_DROPDOWN ),
|
maTraceBox( this, WB_DROPDOWN ),
|
||||||
maErrorText( this ),
|
maErrorText( this ),
|
||||||
maErrorBox( this, WB_DROPDOWN ),
|
maErrorBox( this, WB_DROPDOWN ),
|
||||||
maHookOSLBox( this ),
|
|
||||||
maBox4( this ),
|
maBox4( this ),
|
||||||
maOKButton( this, WB_DEFBUTTON ),
|
maOKButton( this, WB_DEFBUTTON ),
|
||||||
maCancelButton( this ),
|
maCancelButton( this ),
|
||||||
@@ -698,15 +696,6 @@ DbgDialog::DbgDialog() :
|
|||||||
aButtonSize );
|
aButtonSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
maHookOSLBox.Show();
|
|
||||||
maHookOSLBox.SetText("Reroute osl debug ~messages");
|
|
||||||
if ( pData->bHookOSLAssert )
|
|
||||||
maHookOSLBox.Check( true );
|
|
||||||
maHookOSLBox.SetPosSizePixel( LogicToPixel( Point( 10, 240 ), aAppMap ),
|
|
||||||
LogicToPixel( Size( 100, 12 ), aAppMap ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
maInclClassText.Show();
|
maInclClassText.Show();
|
||||||
maInclClassText.SetText("~Include-ObjectTest-Filter");
|
maInclClassText.SetText("~Include-ObjectTest-Filter");
|
||||||
@@ -880,7 +869,6 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
|
|||||||
aData.aExclFilter[sizeof( aData.aExclFilter )-1] = '\0';
|
aData.aExclFilter[sizeof( aData.aExclFilter )-1] = '\0';
|
||||||
|
|
||||||
aData.bOverwrite = maOverwrite.IsChecked() ? true : false;
|
aData.bOverwrite = maOverwrite.IsChecked() ? true : false;
|
||||||
aData.bHookOSLAssert = maHookOSLBox.IsChecked() ? true : false;
|
|
||||||
|
|
||||||
if ( maXtorThis.IsChecked() )
|
if ( maXtorThis.IsChecked() )
|
||||||
aData.nTestFlags |= DBG_TEST_XTOR_THIS;
|
aData.nTestFlags |= DBG_TEST_XTOR_THIS;
|
||||||
@@ -915,7 +903,6 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
|
|||||||
// Umschalten der Laufzeitwerte
|
// Umschalten der Laufzeitwerte
|
||||||
DBG_INSTOUTTRACE( aData.nTraceOut );
|
DBG_INSTOUTTRACE( aData.nTraceOut );
|
||||||
DBG_INSTOUTERROR( aData.nErrorOut );
|
DBG_INSTOUTERROR( aData.nErrorOut );
|
||||||
DbgUpdateOslHook( &aData );
|
|
||||||
|
|
||||||
DbgData* pData = DbgGetData();
|
DbgData* pData = DbgGetData();
|
||||||
#define IMMEDIATE_FLAGS (DBG_TEST_RESOURCE | DBG_TEST_DIALOG | DBG_TEST_BOLDAPPFONT)
|
#define IMMEDIATE_FLAGS (DBG_TEST_RESOURCE | DBG_TEST_DIALOG | DBG_TEST_BOLDAPPFONT)
|
||||||
|
Reference in New Issue
Block a user