From b65618119a94648386d21caa1a7e9ec07cca213f Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 6 Sep 2018 12:15:32 +0000 Subject: [PATCH] fp-lldb debugger: fix hint evaluation / make sure registers are read first. Issue #034229 git-svn-id: trunk@58894 - --- .../lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas b/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas index b99df0c589..c43a92fafc 100644 --- a/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas @@ -136,7 +136,6 @@ var DBG_VERBOSE, DBG_ERRORS: PLazLoggerLogGroup; type - TFPLldbWatches = class; { TFpLldbDebuggerCommandEvaluate } @@ -786,6 +785,14 @@ begin EvalFlags := TDBGEvaluateFlags(AParams[1].VInteger); Result := False; if (HasDwarf) then begin + Threads.CurrentThreads.Count; // trigger threads, in case + if Registers.CurrentRegistersList[CurrentThreadId, CurrentStackFrame].Count = 0 then begin // trigger register, in case + Registers.CurrentRegistersList[CurrentThreadId, CurrentStackFrame].Count; + while DebugInstructionQueue.RunningInstruction <> nil do begin // TODO: use a callback + Application.ProcessMessages; + sleep(30); + end; + end; Result := EvaluateExpression(nil, String(AParams[0].VAnsiString), ResText, ResType, EvalFlags); if EvalFlags * [defNoTypeInfo, defSimpleTypeInfo, defFullTypeInfo] = [defNoTypeInfo]