From 2582ab15ce64dc16237769c92668f89bf1adcd78 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 19 Feb 2014 05:19:29 +0000 Subject: [PATCH] FPGDBMIDebugger: fix function result uninitialized git-svn-id: trunk@44162 - --- components/lazdebuggerfp/fpgdbmidebugger.pp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/components/lazdebuggerfp/fpgdbmidebugger.pp b/components/lazdebuggerfp/fpgdbmidebugger.pp index b951d05527..ae20b65823 100644 --- a/components/lazdebuggerfp/fpgdbmidebugger.pp +++ b/components/lazdebuggerfp/fpgdbmidebugger.pp @@ -181,6 +181,7 @@ function TFpGDBMIDebuggerCommandEvaluate.DoExecute: Boolean; begin FOwner.FEvaluationCmdObj := nil; FOwner.ProcessEvalList; + Result := True; end; procedure TFpGDBMIDebuggerCommandEvaluate.DoFree; @@ -902,8 +903,8 @@ begin if not FpDebugger.EvaluateExpression(WatchValue, WatchValue.Expression, ResText, ResTypeInfo) then begin debugln(['TFPGDBMIWatches.InternalRequestData FAILED']); - inherited InternalRequestData(WatchValue); - continue; + if IsWatchValueAlive then + inherited InternalRequestData(WatchValue); end; finally if IsWatchValueAlive then begin @@ -1057,8 +1058,10 @@ begin for i := 0 to MAX_CTX_CACHE-1 do ReleaseRefAndNil(FLastContext[i]); if not(State in [dsPause, dsInternalPause]) then begin - for i := 0 to FWatchEvalList.Count - 1 do + for i := 0 to FWatchEvalList.Count - 1 do begin TWatchValueBase(FWatchEvalList[i]).RemoveFreeeNotification(@DoWatchFreed); + //TWatchValueBase(FWatchEvalList[i]).Validity := ddsInvalid; + end; FWatchEvalList.Clear; end; end; @@ -1208,6 +1211,10 @@ function TFpGDBMIDebugger.GetInfoContextForContext(AThreadId, var Addr: TDBGPtr; begin + Result := nil; + if FDwarfInfo = nil then + exit; + if (AThreadId <= 0) then begin GetCurrentContext(AThreadId, AStackFrame); end;