FpDebug: TestCase

git-svn-id: trunk@60215 -
This commit is contained in:
martin 2019-01-25 00:45:12 +00:00
parent cfed0db10f
commit 764ceb2e97

View File

@ -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