From 286dadaed9ee6d3a6ee17ec6f33819e233e4e147 Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 4 Jun 2022 19:33:45 +0200 Subject: [PATCH] FpDebugDebugger: fix retrieving stack without limit (fix copy stack to clipboard) (cherry picked from commit 99495ba51a3e27cee35e755eaf81df77c65854d8) --- components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas | 2 +- .../lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas index 0c69a247c8..1dd3dd8f55 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas @@ -778,7 +778,7 @@ begin FCallstack := ACallstack; FCallstack.AddFreeNotification(@DoCallstackFreed_DecRef); if not ADebugger.FDbgController.CurrentProcess.GetThread(FCallstack.ThreadId, AThread) then - ARequiredMinCount := -1; // error + ARequiredMinCount := -2; // error inherited Create(ADebugger, ARequiredMinCount, AThread); end; diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas index c9170262b8..878bc0d9da 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas @@ -562,7 +562,7 @@ procedure TFpThreadWorkerPrepareCallStackEntryList.DoExecute; var t: TDbgThread; begin - if FRequiredMinCount < 0 then + if FRequiredMinCount < -1 then exit; if FThread = nil then begin for t in FDebugger.FDbgController.CurrentProcess.ThreadMap do begin