diff --git a/components/lazdebuggers/lazdebuggerfp/test/testasm.pas b/components/lazdebuggers/lazdebuggerfp/test/testasm.pas index c8aa017f4b..9dddfb555b 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testasm.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testasm.pas @@ -44,9 +44,9 @@ var -debugln([ +debugln([AName, ' // ', codeBytes, ' ', asmInstr, -' ', p-@s[1] +' ', p-@s[1] ,' == ',Length(AData) ]); AssertEquals(AName+' Cnt bytes', Length(AData), p-@s[1]); @@ -61,6 +61,7 @@ codeBytes, ' ', asmInstr, AExp := StringReplace(AExp, ' ', ' ', [rfReplaceAll]); // space AExp := StringReplace(AExp, ', ', ',', [rfReplaceAll]); // space AExp := r.Replace(AExp, '$1$2', True); + AExp := LowerCase(AExp); r.Free; AssertEquals(AName+' asm ', AExp, s); @@ -73,7 +74,12 @@ begin DisAss := TX86AsmDecoder.Create(Process); try - + TestDis('callq 0x7ffbf0250860', #$e8#$99#$da#$04#$00 , 'call +$0004DA99'); + TestDis('callq *0x6c1ec(%rip)', #$ff#$15#$ec#$c1#$06#$00 , 'call dword ptr [rip+$0006C1EC]'); + TestDis('rex.W callq *0x724f2(%rip)', #$48#$ff#$15#$f2#$24#$07#$00, 'call qword ptr [rip+$000724F2]'); + TestDis('callq 0x100001f70', #$e8#$7a#$48#$dc#$ff , 'call -$0023B786'); + TestDis('callq *0x100(%rbx)', #$ff#$93#$00#$01#$00#$00 , 'call dword ptr [rbx+$00000100]'); + TestDis('callq *(%rax)', #$ff#$10 , 'call dword ptr [rax]'); TestDis('add al,$05', #$04#$05, 'add al,$05'); TestDis('add ah,$05', #$80#$c4#$05, 'add ah,$05'); @@ -230,6 +236,14 @@ begin Process.NewMode := dm32; + TestDis('call 0x77cf4d10', #$e8#$67#$70#$fc#$ff , 'call -$00038F99'); + TestDis('call *0x7718202c', #$ff#$15#$2c#$20#$18#$77 , 'call dword ptr [$7718202C]'); + TestDis('call *%esi', #$ff#$d6 , 'call esi'); + TestDis('call *0x80(%ebx)', #$ff#$93#$80#$00#$00#$00 , 'call dword ptr [ebx+$00000080]'); + TestDis('call 0x4301a0', #$e8#$c2#$de#$ff#$ff , 'call -$0000213E'); + TestDis('call *(%edx)', #$ff#$12 , 'call dword ptr [edx]'); + TestDis('call *0x7c(%ebx)', #$ff#$53#$7c , 'call dword ptr [ebx+$7C]'); + TestDis('add al,$05', #$04#$05, 'add al,$05'); TestDis('add ah,$05', #$80#$c4#$05, 'add ah,$05'); TestDis('add ax,$05', #$66#$05#$05#$00, 'add ax,$05'); diff --git a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas index 237b43bc7d..89a1076f42 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas @@ -589,6 +589,7 @@ begin t.CheckResults; finally + Debugger.RunToNextPause(dcStop); t.Free; Debugger.ClearDebuggerMonitors; Debugger.FreeDebugger; @@ -1358,6 +1359,7 @@ if Compiler.Version < 030300 then finally + Debugger.RunToNextPause(dcStop); t.Free; Debugger.ClearDebuggerMonitors; Debugger.FreeDebugger; @@ -1416,6 +1418,7 @@ begin finally + Debugger.RunToNextPause(dcStop); t.Free; Debugger.ClearDebuggerMonitors; Debugger.FreeDebugger; @@ -1744,6 +1747,7 @@ begin finally + Debugger.RunToNextPause(dcStop); t.Free; tp.Free; Debugger.ClearDebuggerMonitors; @@ -2126,6 +2130,7 @@ begin finally + Debugger.RunToNextPause(dcStop); t.Free; t2.Free; Debugger.ClearDebuggerMonitors; @@ -2442,6 +2447,7 @@ begin finally + Debugger.RunToNextPause(dcStop); t.Free; Debugger.ClearDebuggerMonitors; Debugger.FreeDebugger; @@ -2857,6 +2863,7 @@ begin end; finally + Debugger.RunToNextPause(dcStop); t.Free; Debugger.ClearDebuggerMonitors; Debugger.FreeDebugger; @@ -2913,6 +2920,7 @@ begin finally + Debugger.RunToNextPause(dcStop); t.Free; Debugger.ClearDebuggerMonitors; Debugger.FreeDebugger; diff --git a/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas b/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas index 5b6f3b89b5..91ac608f2c 100644 --- a/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas +++ b/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas @@ -429,11 +429,12 @@ begin dcStepOut: LazDebugger.StepOut; dcStepOverInstr: LazDebugger.StepOverInstr; dcStepIntoInstr: LazDebugger.StepIntoInstr; + dcStop: LazDebugger.Stop; else exit; end; Result := WaitForFinishRun(ATimeOut, AWaitForInternal); - if LazDebugger.State = dsPause then + if (LazDebugger.State = dsPause) and (ACmd <> dcStop) then with LazDebugger.GetLocation do begin DebugLnExit('<<< RunToNextPause Ending at %s %d @ %x %s', [SrcFile, SrcLine, Address, dbgs(LazDebugger.State)]); TestLogger.DebugLn('at %s %d @ %x %s', [SrcFile, SrcLine, Address, dbgs(LazDebugger.State)]);