From 3ed45630a09dc4c132a038b99184306daeb870b8 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 3 Jul 2019 18:26:26 +0000 Subject: [PATCH] LazDebuggerFp: slightly faster watch eval. git-svn-id: trunk@61517 - --- .../lazdebuggerfp/fpdebugdebugger.pas | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas index 32caf642fc..2397069da2 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas @@ -1518,15 +1518,24 @@ var WatchValue: TWatchValue; AVal: String; AType: TDBGType; + t: QWord; + i: Integer; begin FWatchAsyncQueued := False; - if FWatchEvalList.Count = 0 then - exit; - WatchValue := TWatchValue(FWatchEvalList[0]); - FWatchEvalList.Delete(0); - WatchValue.RemoveFreeNotification(@DoWatchFreed); + t := GetTickCount64; + i := 0; + repeat + if FWatchEvalList.Count = 0 then + exit; + WatchValue := TWatchValue(FWatchEvalList[0]); + FWatchEvalList.Delete(0); + 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 begin