Debugger: fix updating watches, after changing a variable in the target

git-svn-id: trunk@44095 -
This commit is contained in:
martin 2014-02-16 14:14:58 +00:00
parent 914402e8f9
commit f3bf43a369

View File

@ -683,6 +683,7 @@ type
function GDBEvaluate(const AExpression: String; var AResult: String;
out ATypeInfo: TGDBType; EvalFlags: TDBGEvaluateFlags): Boolean;
function GDBModify(const AExpression, ANewValue: String): Boolean;
procedure GDBModifyDone(const AResult: TGDBMIExecResult; const ATag: PtrInt);
function GDBRun: Boolean;
function GDBPause(const AInternal: Boolean): Boolean;
function GDBStop: Boolean;
@ -8074,12 +8075,18 @@ begin
if not ConvertPascalExpression(S) then Exit(False);
end;
Result := ExecuteCommand('-gdb-set var %s := %s', [AExpression, S], [cfscIgnoreError], R)
Result := ExecuteCommandFull('-gdb-set var %s := %s', [AExpression, S], [cfscIgnoreError], @GDBModifyDone, 0, R)
and (R.State <> dsError);
FTypeRequestCache.Clear;
end;
procedure TGDBMIDebugger.GDBModifyDone(const AResult: TGDBMIExecResult;
const ATag: PtrInt);
begin
FTypeRequestCache.Clear;
TGDBMILocals(Locals).Changed;
TGDBMIWatches(Watches).Changed;
FTypeRequestCache.Clear;
end;
function TGDBMIDebugger.GDBJumpTo(const ASource: String; const ALine: Integer): Boolean;