Evaluate a expression automatically when EvaluateDlg is already shown

git-svn-id: trunk@60046 -
This commit is contained in:
michl 2019-01-09 15:16:09 +00:00
parent 25cba76789
commit 9bfc86dedf
2 changed files with 11 additions and 2 deletions

View File

@ -103,6 +103,7 @@ type
constructor Create(TheOwner: TComponent); override;
procedure Execute(const AExpression: String);
property FindText: string read GetFindText write SetFindText;
procedure UpdateData;
end;
implementation
@ -155,6 +156,11 @@ begin
SetFindText(AExpression);
end;
procedure TEvaluateDlg.UpdateData;
begin
Evaluate;
end;
procedure TEvaluateDlg.EvaluateCallback(Sender: TObject; ASuccess: Boolean;
ResultText: String; ResultDBGType: TDBGType);
var

View File

@ -1406,9 +1406,10 @@ begin
// TODO: Move here from DebuggerCurrentLine / Only currently State change locks execution of gdb
//if ( ((FDebugger.State in [dsPause]) and (OldState = dsRun)) or
// (OldState in [dsPause]) ) and
if (OldState in [dsPause]) and
(FDialogs[ddtInspect] <> nil)
if (OldState in [dsPause]) and (FDialogs[ddtInspect] <> nil)
then TIDEInspectDlg(FDialogs[ddtInspect]).UpdateData;
if (OldState in [dsPause]) and (FDialogs[ddtEvaluate] <> nil)
then TEvaluateDlg(FDialogs[ddtEvaluate]).UpdateData;
case FDebugger.State of
dsError: begin
@ -1523,6 +1524,8 @@ begin
then TAssemblerDlg(FDialogs[ddtAssembler]).SetLocation(FDebugger, Alocation.Address);
if (FDialogs[ddtInspect] <> nil)
then TIDEInspectDlg(FDialogs[ddtInspect]).UpdateData;
if (FDialogs[ddtEvaluate] <> nil)
then TEvaluateDlg(FDialogs[ddtEvaluate]).UpdateData;
if (SrcLine > 0) and (CurrentSourceUnitInfo <> nil) and
GetFullFilename(CurrentSourceUnitInfo, SrcFullName, True)