1
0
Fork 0

DBG: resolved issue #171 (auto-update dump)

This commit is contained in:
mrexodia 2016-07-12 05:08:09 +02:00
parent fdcc3a8236
commit ace432accc
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
1 changed files with 24 additions and 0 deletions

View File

@ -69,6 +69,8 @@ static HANDLE hMemMapThread = 0;
static bool bStopMemMapThread = false;
static HANDLE hTimeWastedCounterThread = 0;
static bool bStopTimeWastedCounterThread = false;
static HANDLE hDumpRefreshThread = 0;
static bool bStopDumpRefreshThread = false;
static String lastDebugText;
static duint timeWastedDebugging = 0;
static EXCEPTION_DEBUG_INFO lastExceptionInfo = { 0 };
@ -154,10 +156,30 @@ static DWORD WINAPI timeWastedCounterThread(void* ptr)
return 0;
}
static DWORD WINAPI dumpRefreshThread(void* ptr)
{
while(!bStopDumpRefreshThread)
{
while(!DbgIsDebugging())
{
if(bStopDumpRefreshThread)
break;
Sleep(10);
}
if(bStopDumpRefreshThread)
break;
timeWastedDebugging++;
GuiUpdateDumpView();
Sleep(200);
}
return 0;
}
void dbginit()
{
hTimeWastedCounterThread = CreateThread(nullptr, 0, timeWastedCounterThread, nullptr, 0, nullptr);
hMemMapThread = CreateThread(nullptr, 0, memMapThread, nullptr, 0, nullptr);
hDumpRefreshThread = CreateThread(nullptr, 0, dumpRefreshThread, nullptr, 0, nullptr);
}
void dbgstop()
@ -166,6 +188,8 @@ void dbgstop()
WaitForThreadTermination(hTimeWastedCounterThread);
bStopMemMapThread = true;
WaitForThreadTermination(hMemMapThread);
bStopDumpRefreshThread = true;
WaitForThreadTermination(hDumpRefreshThread);
}
duint dbgdebuggedbase()