mirror of https://github.com/x64dbg/TitanEngine
- fixed a massive deadlock when TitanEngine was used in various processes
- now removes breakpoints before detaching
This commit is contained in:
parent
bc2240d1c1
commit
6d5480559a
|
|
@ -4,7 +4,11 @@
|
|||
|
||||
MutexLocker::MutexLocker(const char* name)
|
||||
{
|
||||
gMutex=CreateMutexA(0, false, name);
|
||||
int len=strlen(name);
|
||||
DynBuf newNameBuf(len+20);
|
||||
char* newName = (char*)newNameBuf.GetPtr();
|
||||
sprintf(newName, "%s%X", name, GetCurrentProcessId());
|
||||
gMutex=CreateMutexA(0, false, newName);
|
||||
bUnlocked=false;
|
||||
WaitForSingleObject(gMutex, INFINITE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,6 +273,8 @@ __declspec(dllexport) bool TITCALL DetachDebugger(DWORD ProcessId)
|
|||
LPVOID funcDebugActiveProcessStop = NULL;
|
||||
bool FuncReturn = false;
|
||||
|
||||
RemoveAllBreakPoints(UE_OPTION_REMOVEALL);
|
||||
|
||||
if(ProcessId != NULL)
|
||||
{
|
||||
funcDebugActiveProcessStop = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugActiveProcessStop");
|
||||
|
|
|
|||
Loading…
Reference in New Issue