mirror of https://github.com/x64dbg/GleeBug
performance improvements for tracing
This commit is contained in:
parent
367b37d773
commit
e7f709fcda
|
|
@ -113,7 +113,7 @@ namespace GleeBug
|
|||
break;
|
||||
}
|
||||
|
||||
//clear trap flag when set by GleeBug (to prevent an EXCEPTION_SINGLE_STEP after detach
|
||||
//clear trap flag when set by GleeBug (to prevent an EXCEPTION_SINGLE_STEP after detach)
|
||||
if (mDetach && mThread)
|
||||
{
|
||||
if (mThread->isInternalStepping || mThread->isSingleStepping)
|
||||
|
|
|
|||
|
|
@ -42,17 +42,14 @@ namespace GleeBug
|
|||
|
||||
bool Thread::RegReadContext()
|
||||
{
|
||||
SuspendThread(this->hThread);
|
||||
memset(&this->mOldContext, 0, sizeof(CONTEXT));
|
||||
this->mOldContext.ContextFlags = CONTEXT_ALL;
|
||||
bool bReturn = false;
|
||||
this->mOldContext.ContextFlags = CONTEXT_ALL; //TODO: granular control over what's required
|
||||
if (GetThreadContext(this->hThread, &this->mOldContext))
|
||||
{
|
||||
this->registers.SetContext(this->mOldContext);
|
||||
bReturn = true;
|
||||
return true;
|
||||
}
|
||||
ResumeThread(this->hThread);
|
||||
return bReturn;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Thread::RegWriteContext() const
|
||||
|
|
@ -61,10 +58,7 @@ namespace GleeBug
|
|||
if (memcmp(&this->mOldContext, this->registers.GetContext(), sizeof(CONTEXT)) == 0)
|
||||
return true;
|
||||
//update the context
|
||||
SuspendThread(this->hThread);
|
||||
bool bReturn = !!SetThreadContext(this->hThread, this->registers.GetContext());
|
||||
ResumeThread(this->hThread);
|
||||
return bReturn;
|
||||
return !!SetThreadContext(this->hThread, this->registers.GetContext());
|
||||
}
|
||||
|
||||
void Thread::StepInto()
|
||||
|
|
|
|||
Loading…
Reference in New Issue