mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 10:00:48 +02:00
Debugger: Fix eval watch hint in selected StackFrame
This commit is contained in:
parent
9f08e2006b
commit
5357d6a3f0
@ -11443,8 +11443,9 @@ var
|
|||||||
BaseURL, SmartHintStr, Expression: String;
|
BaseURL, SmartHintStr, Expression: String;
|
||||||
HasHint: Boolean;
|
HasHint: Boolean;
|
||||||
Opts: TWatcheEvaluateFlags;
|
Opts: TWatcheEvaluateFlags;
|
||||||
AtomStartPos, AtomEndPos, tid: integer;
|
AtomStartPos, AtomEndPos, tid, st: integer;
|
||||||
aWatch: TCurrentWatch;
|
aWatch: TCurrentWatch;
|
||||||
|
CStack: TIdeCallStack;
|
||||||
begin
|
begin
|
||||||
//DebugLn(['TMainIDE.SrcNotebookShowHintForSource START']);
|
//DebugLn(['TMainIDE.SrcNotebookShowHintForSource START']);
|
||||||
if (SrcEdit=nil) then exit;
|
if (SrcEdit=nil) then exit;
|
||||||
@ -11513,7 +11514,11 @@ begin
|
|||||||
DebugBoss.CurrentWatches.EndUpdate;
|
DebugBoss.CurrentWatches.EndUpdate;
|
||||||
|
|
||||||
tid := DebugBoss.Threads.CurrentThreads.CurrentThreadId;
|
tid := DebugBoss.Threads.CurrentThreads.CurrentThreadId;
|
||||||
FHintWatchData.WatchValue := aWatch.Values[tid, 0] as TCurrentWatchValue;
|
st := 0;
|
||||||
|
CStack := DebugBoss.CallStack.CurrentCallStackList.EntriesForThreads[tid];
|
||||||
|
if CStack <> nil then
|
||||||
|
st := CStack.CurrentIndex;
|
||||||
|
FHintWatchData.WatchValue := aWatch.Values[tid, st] as TCurrentWatchValue;
|
||||||
FHintWatchData.WatchValue.OnValidityChanged := @OnHintWatchValidityChanged;
|
FHintWatchData.WatchValue.OnValidityChanged := @OnHintWatchValidityChanged;
|
||||||
FHintWatchData.WatchValue.Value;
|
FHintWatchData.WatchValue.Value;
|
||||||
OnHintWatchValidityChanged(FHintWatchData.WatchValue);
|
OnHintWatchValidityChanged(FHintWatchData.WatchValue);
|
||||||
|
Loading…
Reference in New Issue
Block a user