Bug fix for the new debugging stuff.

This commit is contained in:
EdwardNutting_cp 2014-01-10 22:47:16 +00:00
parent 87514cde77
commit 9ce8e5dfdb
3 changed files with 32 additions and 22 deletions

View file

@ -119,36 +119,41 @@ Call DebugStub_ProcessCommand
Cmp AL, DebugStub_Const_Vs2Ds_Continue
JE DebugStub_Break_Done
Cmp AL, DebugStub_Const_Vs2Ds_SetAsmBreak
Cmp AL, DebugStub_Const_Vs2Ds_AsmStepInto
JNE DebugStub_Break_Block1_End
Jmp DebugStub_Break_Done
DebugStub_Break_Block1_End:
Cmp AL, DebugStub_Const_Vs2Ds_SetAsmBreak
JNE DebugStub_Break_Block2_End
Call DebugStub_SetAsmBreak
Call DebugStub_AckCommand
Jmp DebugStub_Break_WaitCmd
DebugStub_Break_Block1_End:
Cmp AL, DebugStub_Const_Vs2Ds_StepInto
JNE DebugStub_Break_Block2_End
Mov dword [DebugStub_DebugBreakOnNextTrace], DebugStub_Const_StepTrigger_Into
Mov [DebugStub_BreakEBP], EAX
Jmp DebugStub_Break_Done
DebugStub_Break_Block2_End:
Cmp AL, DebugStub_Const_Vs2Ds_StepOver
Cmp AL, DebugStub_Const_Vs2Ds_StepInto
JNE DebugStub_Break_Block3_End
Mov dword [DebugStub_DebugBreakOnNextTrace], DebugStub_Const_StepTrigger_Over
Mov EAX, [DebugStub_CallerEBP]
Mov dword [DebugStub_DebugBreakOnNextTrace], DebugStub_Const_StepTrigger_Into
Mov [DebugStub_BreakEBP], EAX
Jmp DebugStub_Break_Done
DebugStub_Break_Block3_End:
Cmp AL, DebugStub_Const_Vs2Ds_StepOut
Cmp AL, DebugStub_Const_Vs2Ds_StepOver
JNE DebugStub_Break_Block4_End
Mov dword [DebugStub_DebugBreakOnNextTrace], DebugStub_Const_StepTrigger_Out
Mov dword [DebugStub_DebugBreakOnNextTrace], DebugStub_Const_StepTrigger_Over
Mov EAX, [DebugStub_CallerEBP]
Mov [DebugStub_BreakEBP], EAX
Jmp DebugStub_Break_Done
DebugStub_Break_Block4_End:
Cmp AL, DebugStub_Const_Vs2Ds_StepOut
JNE DebugStub_Break_Block5_End
Mov dword [DebugStub_DebugBreakOnNextTrace], DebugStub_Const_StepTrigger_Out
Mov EAX, [DebugStub_CallerEBP]
Mov [DebugStub_BreakEBP], EAX
Jmp DebugStub_Break_Done
DebugStub_Break_Block5_End:
Jmp DebugStub_Break_WaitCmd
DebugStub_Break_Done:

View file

@ -170,6 +170,11 @@ WaitCmd:
if AL = #Vs2Ds_Continue goto Done
//If Asm step into, we need to continue execution
if AL = #Vs2Ds_AsmStepInto {
goto Done
}
if AL = #Vs2Ds_SetAsmBreak {
SetAsmBreak()
AckCommand()

View file

@ -388,15 +388,15 @@ namespace Cosmos.VS.Windows
xSetNextLabelToCurrent = false;
}
// If its Int3 or so, we need to set the current label to the next non debug op.
//if (xAsmCode.IsDebugCode)
//{
// if (xAsmCode.LabelMatches(mCurrentLabel))
// {
// xSetNextLabelToCurrent = true;
// }
// continue;
//}
//If its Int3 or so, we need to set the current label to the next non debug op.
if (xAsmCode.IsDebugCode)
{
if (xAsmCode.LabelMatches(mCurrentLabel))
{
xSetNextLabelToCurrent = true;
}
continue;
}
mLines.Add(xAsmCode);
}