fixed a massive bug with exception handling (almost all exceptions were swallowed by the debugger)

This commit is contained in:
mr.exodia 2014-02-08 20:35:14 +01:00
parent ba35c43ddc
commit 355fd1bada
2 changed files with 10 additions and 16 deletions

View File

@ -16296,6 +16296,7 @@ __declspec(dllexport) void TITCALL DebugLoop()
{ {
EngineExecutePluginDebugCallBack(&DBGEvent, UE_PLUGIN_CALL_REASON_PREDEBUG); EngineExecutePluginDebugCallBack(&DBGEvent, UE_PLUGIN_CALL_REASON_PREDEBUG);
} }
while(!BreakDBG) //actual debug loop while(!BreakDBG) //actual debug loop
{ {
WaitForDebugEvent(&DBGEvent, engineWaitForDebugEventTimeOut); WaitForDebugEvent(&DBGEvent, engineWaitForDebugEventTimeOut);
@ -16759,6 +16760,7 @@ __declspec(dllexport) void TITCALL DebugLoop()
case EXCEPTION_DEBUG_EVENT: case EXCEPTION_DEBUG_EVENT:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED; //let the debuggee handle exceptions per default
printf("Exception: 0x%X\n", DBGEvent.u.Exception.ExceptionRecord.ExceptionCode); printf("Exception: 0x%X\n", DBGEvent.u.Exception.ExceptionRecord.ExceptionCode);
//NOTE: useless callback? //NOTE: useless callback?
if(DBGCustomHandler->chEverythingElse != NULL) if(DBGCustomHandler->chEverythingElse != NULL)
@ -17554,7 +17556,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_ACCESS_VIOLATION: case STATUS_ACCESS_VIOLATION:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chAccessViolation != NULL) if(DBGCustomHandler->chAccessViolation != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chAccessViolation); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chAccessViolation);
@ -17789,7 +17790,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_NONCONTINUABLE_EXCEPTION: case STATUS_NONCONTINUABLE_EXCEPTION:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chNonContinuableException != NULL) if(DBGCustomHandler->chNonContinuableException != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chNonContinuableException); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chNonContinuableException);
@ -17807,7 +17807,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_ARRAY_BOUNDS_EXCEEDED: case STATUS_ARRAY_BOUNDS_EXCEEDED:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chArrayBoundsException != NULL) if(DBGCustomHandler->chArrayBoundsException != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chArrayBoundsException); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chArrayBoundsException);
@ -17825,7 +17824,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_FLOAT_DENORMAL_OPERAND: case STATUS_FLOAT_DENORMAL_OPERAND:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chFloatDenormalOperand != NULL) if(DBGCustomHandler->chFloatDenormalOperand != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chFloatDenormalOperand); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chFloatDenormalOperand);
@ -17843,7 +17841,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_FLOAT_DIVIDE_BY_ZERO: case STATUS_FLOAT_DIVIDE_BY_ZERO:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chFloatDevideByZero != NULL) if(DBGCustomHandler->chFloatDevideByZero != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chFloatDevideByZero); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chFloatDevideByZero);
@ -17861,7 +17858,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_INTEGER_DIVIDE_BY_ZERO: case STATUS_INTEGER_DIVIDE_BY_ZERO:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chIntegerDevideByZero != NULL) if(DBGCustomHandler->chIntegerDevideByZero != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chIntegerDevideByZero); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chIntegerDevideByZero);
@ -17879,7 +17875,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_INTEGER_OVERFLOW: case STATUS_INTEGER_OVERFLOW:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chIntegerOverflow != NULL) if(DBGCustomHandler->chIntegerOverflow != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chIntegerOverflow); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chIntegerOverflow);
@ -17897,7 +17892,6 @@ __declspec(dllexport) void TITCALL DebugLoop()
case STATUS_PRIVILEGED_INSTRUCTION: case STATUS_PRIVILEGED_INSTRUCTION:
{ {
DBGCode = DBG_EXCEPTION_NOT_HANDLED;
if(DBGCustomHandler->chPrivilegedInstruction != NULL) if(DBGCustomHandler->chPrivilegedInstruction != NULL)
{ {
myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chPrivilegedInstruction); myCustomHandler = (fCustomHandler)((LPVOID)DBGCustomHandler->chPrivilegedInstruction);

View File

@ -60,16 +60,16 @@
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(IntDir)x32</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(IntDir)x32\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\x32</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\x32\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Configuration)\x64</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Configuration)\x64\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\x64</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\x64\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(IntDir)x32</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(IntDir)x32\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\x32</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\x32\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Configuration)\x64</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Configuration)\x64\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\x64</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\x64\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />