summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarcel Metz <mmetz@adrian-broher.net>2012-01-10 07:19:46 +0100
committerDavid Tardon <dtardon@redhat.com>2012-01-10 07:23:04 +0100
commit1efa072b558d5b2aee03c658c4a781654985ba2b (patch)
tree70dd5e2024e1c109345ca0e31fd252e8a25914b3 /tools
parent05c51d5dfb58549e5bf26cb5c8b9b4f0083dca25 (diff)
Remove cruft in debug tools
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/debug.hxx33
-rw-r--r--tools/source/debug/debug.cxx75
2 files changed, 2 insertions, 106 deletions
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index 3746350a2d44..c335a0aa6757 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -70,18 +70,6 @@ typedef void (*DbgTestSolarMutexProc)();
#define DBG_TEST_XTOR_REPORT (0x00000008)
#define DBG_TEST_XTOR_TRACE (0x00000010)
-#define DBG_TEST_MEM (0x00FFF000)
-#define DBG_TEST_MEM_INIT (0x00001000)
-#define DBG_TEST_MEM_OVERWRITE (0x00002000)
-#define DBG_TEST_MEM_OVERWRITEFREE (0x00004000)
-#define DBG_TEST_MEM_POINTER (0x00008000)
-#define DBG_TEST_MEM_REPORT (0x00010000)
-#define DBG_TEST_MEM_TRACE (0x00020000)
-#define DBG_TEST_MEM_NEWDEL (0x00040000)
-#define DBG_TEST_MEM_XTOR (0x00080000)
-#define DBG_TEST_MEM_SYSALLOC (0x00100000)
-#define DBG_TEST_MEM_LEAKREPORT (0x00200000)
-
#define DBG_TEST_PROFILING (0x01000000)
#define DBG_TEST_RESOURCE (0x02000000)
#define DBG_TEST_DIALOG (0x04000000)
@@ -113,9 +101,6 @@ struct DbgData
sal_uIntPtr nWarningOut;
sal_uIntPtr nErrorOut;
sal_uIntPtr bHookOSLAssert;
- sal_uInt8 bMemInit;
- sal_uInt8 bMemBound;
- sal_uInt8 bMemFree;
sal_Char aDebugName[260];
sal_Char aInclFilter[512];
sal_Char aExclFilter[512];
@@ -140,9 +125,7 @@ struct DbgDataType
#define DBG_FUNC_SETPRINTMSGBOX 6
#define DBG_FUNC_SETPRINTWINDOW 7
#define DBG_FUNC_SETPRINTTESTTOOL 8
-#define DBG_FUNC_MEMTEST 9
#define DBG_FUNC_XTORINFO 10
-#define DBG_FUNC_MEMINFO 11
#define DBG_FUNC_COREDUMP 12
#define DBG_FUNC_ALLERROROUT 13
#define DBG_FUNC_SETTESTSOLARMUTEX 14
@@ -317,11 +300,6 @@ inline void DbgXtorInfo( sal_Char* pBuf )
DbgFunc( DBG_FUNC_XTORINFO, (void*)pBuf );
}
-inline void DbgMemInfo( sal_Char* pBuf )
-{
- DbgFunc( DBG_FUNC_MEMINFO, (void*)pBuf );
-}
-
inline void DbgCoreDump()
{
DbgFunc( DBG_FUNC_COREDUMP );
@@ -365,11 +343,6 @@ TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... )
// --- Dbg-Test-Functions ---
-inline void DbgMemTest( void* p = NULL )
-{
- DbgFunc( DBG_FUNC_MEMTEST, p );
-}
-
#define DBG_PROF_START 1
#define DBG_PROF_STOP 2
#define DBG_PROF_CONTINUE 3
@@ -429,9 +402,6 @@ public:
#define DBG_STARTAPPEXECUTE() DbgStartStackTree()
#define DBG_ENDAPPEXECUTE() DbgEndStackTree()
-#define DBG_MEMTEST() DbgMemTest()
-#define DBG_MEMTEST_PTR( p ) DbgMemTest( (void*)p )
-
#define DBG_PROFSTART( aName ) \
DbgProf( DBG_PROF_START, DBG_FUNC( aName ) )
@@ -544,9 +514,6 @@ typedef const sal_Char* (*DbgUsr)(const void* pThis );
#define DBG_STARTAPPEXECUTE() ((void)0)
#define DBG_ENDAPPEXECUTE() ((void)0)
-#define DBG_MEMTEST() ((void)0)
-#define DBG_MEMTEST_PTR( p ) ((void)0)
-
#define DBG_NAME( aName )
#define DBG_NAMEEX( aName )
#define DBG_NAMEEX_VISIBILITY( aName, vis )
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 676128d1080a..5976b1c9a03a 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -146,7 +146,7 @@ struct DebugData
,pOldDebugMessageFunc( NULL )
,bOslIsHooked( false )
{
- aDbgData.nTestFlags = DBG_TEST_RESOURCE | DBG_TEST_MEM_INIT;
+ aDbgData.nTestFlags = DBG_TEST_RESOURCE;
aDbgData.bOverwrite = sal_True;
aDbgData.nTraceOut = DBG_OUT_NULL;
aDbgData.nWarningOut = DBG_OUT_NULL;
@@ -155,9 +155,6 @@ struct DebugData
#else
aDbgData.nErrorOut = DBG_OUT_MSGBOX;
#endif
- aDbgData.bMemInit = 0x77;
- aDbgData.bMemBound = 0x55;
- aDbgData.bMemFree = 0x33;
aDbgData.bHookOSLAssert = sal_True;
aDbgData.aDebugName[0] = 0;
aDbgData.aInclFilter[0] = 0;
@@ -234,15 +231,6 @@ void ImplDbgUnlock()
// =======================================================================
-#if defined WNT
-//#define SV_MEMMGR //
-#endif
-#ifdef SV_MEMMGR
-void DbgImpCheckMemory( void* p = NULL );
-void DbgImpCheckMemoryDeInit();
-void DbgImpMemoryInfo( sal_Char* pBuf );
-#endif
-
#define FILE_LINEEND "\n"
// =======================================================================
@@ -724,25 +712,6 @@ static DebugData* GetDebugData()
lcl_tryReadConfigBoolean( pLine, nLineLength, "oslhook", &aDebugData.aDbgData.bHookOSLAssert );
}
- // elements of the [memory] section
- if ( eCurrentSection == eMemory )
- {
- lcl_tryReadConfigFlag( pLine, nLineLength, "initialize", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_INIT );
- lcl_tryReadConfigFlag( pLine, nLineLength, "overwrite", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_OVERWRITE );
- lcl_tryReadConfigFlag( pLine, nLineLength, "overwrite_free", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_OVERWRITEFREE );
- lcl_tryReadConfigFlag( pLine, nLineLength, "pointer", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_POINTER );
- lcl_tryReadConfigFlag( pLine, nLineLength, "report", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_REPORT );
- lcl_tryReadConfigFlag( pLine, nLineLength, "trace", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_TRACE );
- lcl_tryReadConfigFlag( pLine, nLineLength, "new_and_delete", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_NEWDEL );
- lcl_tryReadConfigFlag( pLine, nLineLength, "object_test", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_XTOR );
- lcl_tryReadConfigFlag( pLine, nLineLength, "sys_alloc", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_SYSALLOC );
- lcl_tryReadConfigFlag( pLine, nLineLength, "leak_report", &aDebugData.aDbgData.nTestFlags, DBG_TEST_MEM_LEAKREPORT );
-
- lcl_tryReadHexByte( pLine, nLineLength, "init_byte", &aDebugData.aDbgData.bMemInit );
- lcl_tryReadHexByte( pLine, nLineLength, "bound_byte", &aDebugData.aDbgData.bMemBound );
- lcl_tryReadHexByte( pLine, nLineLength, "free_byte", &aDebugData.aDbgData.bMemFree );
- }
-
// elements of the [gui] section
if ( eCurrentSection == eGUI )
{
@@ -1018,7 +987,7 @@ static void DebugDeInit()
// Variablen abstuerzen, da die Pointeranpassung dann nicht mehr richtig
// funktioniert
pData->aDbgData.nTraceOut = nOldOut;
- pData->aDbgData.nTestFlags &= (DBG_TEST_MEM | DBG_TEST_PROFILING);
+ pData->aDbgData.nTestFlags &= DBG_TEST_PROFILING;
pData->aDbgPrintUserChannels.clear();
pData->pDbgPrintTestTool = NULL;
pData->pDbgPrintWindow = NULL;
@@ -1072,10 +1041,6 @@ static void DebugGlobalDeInit()
pData->pProfList = NULL;
}
-#ifdef SV_MEMMGR
- DbgImpCheckMemoryDeInit();
-#endif
-
// Profiling-Flags ausschalten
pData->aDbgData.nTraceOut = nOldOut;
pData->aDbgData.nTestFlags &= ~DBG_TEST_PROFILING;
@@ -1212,24 +1177,6 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
lcl_writeConfigBoolean( pIniFile, "oslhook", pData->bHookOSLAssert );
lcl_lineFeed( pIniFile );
- lcl_startSection( pIniFile, eMemory );
- lcl_writeConfigFlag( pIniFile, "initialize", pData->nTestFlags, DBG_TEST_MEM_INIT );
- lcl_writeConfigFlag( pIniFile, "overwrite", pData->nTestFlags, DBG_TEST_MEM_OVERWRITE );
- lcl_writeConfigFlag( pIniFile, "overwrite_free", pData->nTestFlags, DBG_TEST_MEM_OVERWRITEFREE );
- lcl_writeConfigFlag( pIniFile, "pointer", pData->nTestFlags, DBG_TEST_MEM_POINTER );
- lcl_writeConfigFlag( pIniFile, "report", pData->nTestFlags, DBG_TEST_MEM_REPORT );
- lcl_writeConfigFlag( pIniFile, "trace", pData->nTestFlags, DBG_TEST_MEM_TRACE );
- lcl_writeConfigFlag( pIniFile, "new_and_delete", pData->nTestFlags, DBG_TEST_MEM_NEWDEL );
- lcl_writeConfigFlag( pIniFile, "object_test", pData->nTestFlags, DBG_TEST_MEM_XTOR );
- lcl_writeConfigFlag( pIniFile, "sys_alloc", pData->nTestFlags, DBG_TEST_MEM_SYSALLOC );
- lcl_writeConfigFlag( pIniFile, "leak_report", pData->nTestFlags, DBG_TEST_MEM_LEAKREPORT );
-
- lcl_lineFeed( pIniFile );
- lcl_writeHexByte( pIniFile, "init_byte", pData->bMemInit );
- lcl_writeHexByte( pIniFile, "bound_byte", pData->bMemBound );
- lcl_writeHexByte( pIniFile, "free_byte", pData->bMemFree );
-
- lcl_lineFeed( pIniFile );
lcl_startSection( pIniFile, eGUI );
lcl_writeConfigString( pIniFile, "debug_window_state", pData->aDbgWinState );
@@ -1252,22 +1199,10 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
}
break;
- case DBG_FUNC_MEMTEST:
-#ifdef SV_MEMMGR
- DbgImpCheckMemory( pParam );
-#endif
- break;
-
case DBG_FUNC_XTORINFO:
DebugXTorInfo( (sal_Char*)pParam );
break;
- case DBG_FUNC_MEMINFO:
-#ifdef SV_MEMMGR
- DbgImpMemoryInfo( (sal_Char*)pParam );
-#endif
- break;
-
case DBG_FUNC_COREDUMP:
ImplCoreDump();
break;
@@ -1418,12 +1353,6 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
{
DebugData* pData = ImplGetDebugData();
- // Verbindung zu Debug-Memory-Manager testen
-#ifdef SV_MEMMGR
- if ( pData->aDbgData.nTestFlags & DBG_TEST_MEM_XTOR )
- DbgImpCheckMemory();
-#endif
-
// Schnell-Test
if ( !(pData->aDbgData.nTestFlags & DBG_TEST_XTOR) )
return;