mirror of https://github.com/x64dbg/TitanEngine
directly use thread context manipulation for StepInto
This commit is contained in:
parent
d7e66e5ae4
commit
21e146bc23
|
|
@ -4,6 +4,7 @@
|
|||
#include "Global.Handle.h"
|
||||
#include "Global.Threader.h"
|
||||
#include "Global.Librarian.h"
|
||||
#include "Global.Engine.h"
|
||||
|
||||
__declspec(dllexport) void TITCALL ForceClose()
|
||||
{
|
||||
|
|
@ -62,10 +63,12 @@ __declspec(dllexport) void TITCALL StepInto(LPVOID StepCallBack)
|
|||
}
|
||||
else
|
||||
{
|
||||
ULONG_PTR ueContext = NULL;
|
||||
ueContext = (ULONG_PTR)GetContextData(UE_EFLAGS);
|
||||
ueContext |= UE_TRAP_FLAG;
|
||||
SetContextData(UE_EFLAGS, ueContext);
|
||||
CONTEXT myDBGContext;
|
||||
HANDLE hActiveThread = EngineOpenThread(THREAD_GETSETSUSPEND, false, DBGEvent.dwThreadId);
|
||||
myDBGContext.ContextFlags = CONTEXT_CONTROL;
|
||||
GetThreadContext(hActiveThread, &myDBGContext);
|
||||
myDBGContext.EFlags |= UE_TRAP_FLAG;
|
||||
SetThreadContext(hActiveThread, &myDBGContext);
|
||||
engineStepActive = true;
|
||||
engineStepCallBack = StepCallBack;
|
||||
engineStepCount = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue