From 9f70423e351412adafecbd80dc97dc57d0b1c206 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 6 Sep 2022 21:26:07 +0200 Subject: [PATCH] LazDebuggerFp: fix getting full Callstack.Count - Issue #39886 (cherry picked from commit 61e5fb272ae172886c042c306bbd5e6db695dbff) --- .../lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas index 48abb6424f..112edb8b1c 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas @@ -547,7 +547,8 @@ begin FDebugger.FLockList.GetLockFor(ThreadCallStack); try CurCnt := ThreadCallStack.Count; - while (not StopRequested) and (FRequiredMinCount > CurCnt) and + while (not StopRequested) and + ( (FRequiredMinCount > CurCnt) or (FRequiredMinCount < 0) ) and (not ThreadCallStack.HasReadAllAvailableFrames) do begin ReqCnt := Min(CurCnt + 5, FRequiredMinCount);