mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 01:49:25 +02:00
Debugger: Ensure Queue is not blocked by LineInfo Request. (If a LineInfoRequest was queued the DebuggerCurrentLine could not search the stack, as commands were not immediately run
git-svn-id: trunk@38509 -
This commit is contained in:
parent
6863f109a3
commit
acb5e8bc8c
@ -6136,7 +6136,16 @@ begin
|
|||||||
FGetLineSymbolsCmdObj.OnExecuted := @DoGetLineSymbolsFinished;
|
FGetLineSymbolsCmdObj.OnExecuted := @DoGetLineSymbolsFinished;
|
||||||
FGetLineSymbolsCmdObj.OnDestroy := @DoGetLineSymbolsDestroyed;
|
FGetLineSymbolsCmdObj.OnDestroy := @DoGetLineSymbolsDestroyed;
|
||||||
FGetLineSymbolsCmdObj.Priority := GDCMD_PRIOR_LINE_INFO;
|
FGetLineSymbolsCmdObj.Priority := GDCMD_PRIOR_LINE_INFO;
|
||||||
TGDBMIDebugger(Debugger).QueueCommand(FGetLineSymbolsCmdObj);
|
(* TGDBMIDebugger(Debugger).FCommandQueueExecLock > 0
|
||||||
|
Force queue, if locked. This will set the RunLevel
|
||||||
|
This can be called in AsyncCAll (TApplication), while in QueueExecuteLock (this does not run on unlock)
|
||||||
|
Without ForceQueue, the queue is virtually locked until the current command finishes.
|
||||||
|
But ExecCommand must be able to unlock
|
||||||
|
Reproduce: Trigger Exception in app startup (lfm loading). Stack is not searched.
|
||||||
|
*)
|
||||||
|
TGDBMIDebugger(Debugger).QueueCommand(FGetLineSymbolsCmdObj,
|
||||||
|
TGDBMIDebugger(Debugger).FCommandQueueExecLock > 0
|
||||||
|
);
|
||||||
(* DoEvaluationFinished may be called immediately at this point *)
|
(* DoEvaluationFinished may be called immediately at this point *)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -10995,7 +11004,7 @@ end;
|
|||||||
|
|
||||||
procedure TGDBMIDebuggerCommand.ProcessFrame(const ALocation: TDBGLocationRec);
|
procedure TGDBMIDebuggerCommand.ProcessFrame(const ALocation: TDBGLocationRec);
|
||||||
begin
|
begin
|
||||||
FTheDebugger.DoCurrent(ALocation);
|
FTheDebugger.DoCurrent(ALocation); // TODO: only selected callers
|
||||||
FTheDebugger.FCurrentLocation := ALocation;
|
FTheDebugger.FCurrentLocation := ALocation;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user