LazDebuggerFp: slightly faster watch eval.

git-svn-id: trunk@61517 -
This commit is contained in:
martin 2019-07-03 18:26:26 +00:00
parent 96ba76e670
commit 3ed45630a0

View File

@ -1518,8 +1518,13 @@ var
WatchValue: TWatchValue; WatchValue: TWatchValue;
AVal: String; AVal: String;
AType: TDBGType; AType: TDBGType;
t: QWord;
i: Integer;
begin begin
FWatchAsyncQueued := False; FWatchAsyncQueued := False;
t := GetTickCount64;
i := 0;
repeat
if FWatchEvalList.Count = 0 then if FWatchEvalList.Count = 0 then
exit; exit;
WatchValue := TWatchValue(FWatchEvalList[0]); WatchValue := TWatchValue(FWatchEvalList[0]);
@ -1527,6 +1532,10 @@ begin
WatchValue.RemoveFreeNotification(@DoWatchFreed); WatchValue.RemoveFreeNotification(@DoWatchFreed);
EvaluateExpression(WatchValue, WatchValue.Expression, AVal, AType); EvaluateExpression(WatchValue, WatchValue.Expression, AVal, AType);
inc(i);
{$PUSH}{$Q-}
until (GetTickCount64 - t > 60) or (i > 30);
{$POP}
if (not FWatchAsyncQueued) and (FWatchEvalList.Count > 0) then if (not FWatchAsyncQueued) and (FWatchEvalList.Count > 0) then
begin begin