diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.asm b/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.asm index 820d475ba..5a0c7fae0 100644 --- a/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.asm +++ b/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.asm @@ -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: diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.xs b/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.xs index 8df8aed4e..5a4a640b9 100644 --- a/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.xs +++ b/source2/Compiler/Cosmos.Compiler.DebugStub/DebugStub.xs @@ -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() diff --git a/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs b/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs index 4916a8c3f..2bea1e690 100644 --- a/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs +++ b/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs @@ -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); }