This commit is contained in:
TheLuda 2008-10-15 18:25:33 +02:00
parent 899d7dec74
commit 92441a0241
21 changed files with 68 additions and 68 deletions

View file

@ -330,22 +330,22 @@ void WheatyExceptionReport::PrintSystemInfo()
//===========================================================================
void WheatyExceptionReport::printTracesForAllThreads()
{
HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
THREADENTRY32 te32;
HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
THREADENTRY32 te32;
DWORD dwOwnerPID = GetCurrentProcessId();
m_hProcess = GetCurrentProcess();
// Take a snapshot of all running threads
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
if( hThreadSnap == INVALID_HANDLE_VALUE )
return;
// Fill in the size of the structure before using it.
te32.dwSize = sizeof(THREADENTRY32 );
// Take a snapshot of all running threads
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
if( hThreadSnap == INVALID_HANDLE_VALUE )
return;
// Fill in the size of the structure before using it.
te32.dwSize = sizeof(THREADENTRY32 );
// Retrieve information about the first thread,
// and exit if unsuccessful
if( !Thread32First( hThreadSnap, &te32 ) )
if( !Thread32First( hThreadSnap, &te32 ) )
{
CloseHandle( hThreadSnap ); // Must clean up the
// snapshot object!
@ -355,8 +355,8 @@ void WheatyExceptionReport::printTracesForAllThreads()
// Now walk the thread list of the system,
// and display information about each thread
// associated with the specified process
do
{
do
{
if( te32.th32OwnerProcessID == dwOwnerPID )
{
CONTEXT context;
@ -368,7 +368,7 @@ void WheatyExceptionReport::printTracesForAllThreads()
}
CloseHandle(threadHandle);
}
} while( Thread32Next(hThreadSnap, &te32 ) );
} while( Thread32Next(hThreadSnap, &te32 ) );
// Don't forget to clean up the snapshot object.
CloseHandle( hThreadSnap );
@ -604,7 +604,7 @@ bool bWriteVariables, HANDLE pThreadHandle) // true if local/par
{
_tprintf( _T("\r\nCall stack:\r\n") );
_tprintf( _T("Address Frame Function SourceFile\r\n") );
_tprintf( _T("Address Frame Function SourceFile\r\n") );
DWORD dwMachineType = 0;
// Could use SymSetOptions here to add the SYMOPT_DEFERRED_LOADS flag
@ -906,10 +906,10 @@ char* Name)
// BasicType basicType = GetBasicType(children.ChildId[i], modBase );
//
// pszCurrBuffer += sprintf( pszCurrBuffer, rgBaseType[basicType]);
// pszCurrBuffer += sprintf( pszCurrBuffer, rgBaseType[basicType]);
//
// Emit the variable name
// pszCurrBuffer += sprintf( pszCurrBuffer, "\'%s\'", Name );
// pszCurrBuffer += sprintf( pszCurrBuffer, "\'%s\'", Name );
pszCurrBuffer = FormatOutputValue( pszCurrBuffer, basicType,
length, (PVOID)dwFinalOffset );