mirror of https://github.com/x64dbg/TitanEngine
Make SafeAttach the default
This commit is contained in:
parent
2447a299c8
commit
0a1c3236b8
|
|
@ -522,7 +522,7 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
}
|
||||
else //breakpoint not in list
|
||||
{
|
||||
if(!FirstBPX) //program generated a breakpoint exception
|
||||
if(DebugAttachedToProcess || !FirstBPX) //program generated a breakpoint exception
|
||||
{
|
||||
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
|
||||
if(DBGCustomHandler->chBreakPoint != NULL)
|
||||
|
|
|
|||
|
|
@ -547,13 +547,13 @@ __declspec(dllexport) bool TITCALL AttachDebugger(DWORD ProcessId, bool KillOnEx
|
|||
EngineSetDebugPrivilege(GetCurrentProcess(), true);
|
||||
DebugRemoveDebugPrivilege = true;
|
||||
}
|
||||
if((engineSafeAttach ? DebugActiveProcess_ : DebugActiveProcess)(ProcessId))
|
||||
if(DebugActiveProcess_(ProcessId))
|
||||
{
|
||||
funcDebugSetProcessKillOnExit = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugSetProcessKillOnExit");
|
||||
if(funcDebugSetProcessKillOnExit != NULL)
|
||||
{
|
||||
myDebugSetProcessKillOnExit = (fDebugSetProcessKillOnExit)(funcDebugSetProcessKillOnExit);
|
||||
myDebugSetProcessKillOnExit(KillOnExit && !engineSafeAttach ? true : false);
|
||||
myDebugSetProcessKillOnExit(KillOnExit);
|
||||
}
|
||||
DebugDebuggingDLL = false;
|
||||
DebugAttachedToProcess = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue