From 764ceb2e97ae84aa605f8e3fd0e2b12c041c4a72 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 25 Jan 2019 00:45:12 +0000 Subject: [PATCH] FpDebug: TestCase git-svn-id: trunk@60215 - --- .../lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas b/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas index 8cc5bba91b..42498ec170 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas @@ -187,11 +187,12 @@ begin b1 := dbg.BreakPoints.Add(loc.Address); b1.InitialEnabled := True; b1.Enabled := True; - for i := 0 to dbg.Threads.CurrentThreads.Count do + for i := 0 to dbg.Threads.CurrentThreads.Count - 1 do if dbg.Threads.CurrentThreads[i].ThreadId <> dbg.Threads.CurrentThreads.CurrentThreadId then begin dbg.Threads.ChangeCurrentThread(dbg.Threads.CurrentThreads[i].ThreadId); break; end; + Debugger.WaitForFinishRun(); loc := dbg.GetLocation; TestTrue('loc thread main', loc.SrcLine > Src.BreakPoints['New2']); @@ -207,6 +208,7 @@ begin Debugger.RunToNextPause(dcRun); +(* // TODO: breakpoints in diff threads may need to be hit, after the other break continued If loc.SrcLine >= Src.BreakPoints['Main2']-2 then begin TestLocation('main1', 'Main1'); Debugger.BreakPointByName('Main1').Enabled := False; @@ -221,6 +223,7 @@ begin Debugger.RunToNextPause(dcRun); TestEquals('b1 hits after', 0, b1.HitCount); TestEquals('b2 hits after', 0, b2.HitCount); +*) dbg.Stop; finally