fixed a bug with attaching (DebugReset would cause the custom callbacks to be reset, which means attaching doesn't work).

This commit is contained in:
Mr. eXoDia 2014-07-18 16:37:52 +02:00
parent 4b54b7bcea
commit 8e21d1072d
3 changed files with 2 additions and 3 deletions

View File

@ -1406,6 +1406,7 @@ __declspec(dllexport) void TITCALL DebugLoop()
{ {
ExtensionManagerPluginDebugCallBack(&DBGEvent, UE_PLUGIN_CALL_REASON_POSTDEBUG); ExtensionManagerPluginDebugCallBack(&DBGEvent, UE_PLUGIN_CALL_REASON_POSTDEBUG);
} }
DebuggerReset();
} }
__declspec(dllexport) void TITCALL DebugLoopEx(DWORD TimeOut) __declspec(dllexport) void TITCALL DebugLoopEx(DWORD TimeOut)

View File

@ -45,7 +45,6 @@ __declspec(dllexport) void* TITCALL InitDebugW(wchar_t* szFileName, wchar_t* szC
{ {
int DebugConsoleFlag = NULL; int DebugConsoleFlag = NULL;
DebuggerReset();
if(DebugDebuggingDLL) if(DebugDebuggingDLL)
{ {
DebugConsoleFlag = CREATE_NO_WINDOW|CREATE_SUSPENDED; DebugConsoleFlag = CREATE_NO_WINDOW|CREATE_SUSPENDED;
@ -226,7 +225,6 @@ __declspec(dllexport) bool TITCALL AttachDebugger(DWORD ProcessId, bool KillOnEx
if(ProcessId != NULL && dbgProcessInformation.hProcess == NULL) if(ProcessId != NULL && dbgProcessInformation.hProcess == NULL)
{ {
DebuggerReset();
if(engineEnableDebugPrivilege) if(engineEnableDebugPrivilege)
{ {
EngineSetDebugPrivilege(GetCurrentProcess(), true); EngineSetDebugPrivilege(GetCurrentProcess(), true);

View File

@ -194,7 +194,7 @@ __declspec(dllexport) ULONG_PTR TITCALL GetPE32DataFromMappedFile(ULONG_PTR File
} }
else if(WhichData == UE_IMAGEBASE) else if(WhichData == UE_IMAGEBASE)
{ {
return(PEHeader64->OptionalHeader.ImageBase); return (ULONG_PTR)(PEHeader64->OptionalHeader.ImageBase);
} }
else if(WhichData == UE_OEP) else if(WhichData == UE_OEP)
{ {