diff --git a/debugger/gdbmidebugger.pp b/debugger/gdbmidebugger.pp index 33b40f9080..34e8263b82 100644 --- a/debugger/gdbmidebugger.pp +++ b/debugger/gdbmidebugger.pp @@ -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;