From 01d5ff22cc7325b415388a61933d3d40d0b134f8 Mon Sep 17 00:00:00 2001 From: Andreas Hollandt Date: Fri, 29 Jan 2021 23:17:15 +0100 Subject: [PATCH] test set $pc cmd --- src/MICore/CommandFactories/gdb.cs | 2 ++ src/MIDebugEngine/AD7.Impl/AD7Engine.cs | 1 + src/OpenDebugAD7/AD7DebugSession.cs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MICore/CommandFactories/gdb.cs b/src/MICore/CommandFactories/gdb.cs index 5df01be1c..9131d2373 100644 --- a/src/MICore/CommandFactories/gdb.cs +++ b/src/MICore/CommandFactories/gdb.cs @@ -201,6 +201,8 @@ public override Task ExecJump(string filename, int line) public override Task ExecJump(ulong address) { + return _debugger.ConsoleCmdAsync("set $pc = " + string.Format(CultureInfo.InvariantCulture, "0x{0:X}", address), false); + string target = "*" + string.Format(CultureInfo.InvariantCulture, "0x{0:X}", address); return JumpInternal(target); } diff --git a/src/MIDebugEngine/AD7.Impl/AD7Engine.cs b/src/MIDebugEngine/AD7.Impl/AD7Engine.cs index 90e5df60a..9d6e2c1d5 100755 --- a/src/MIDebugEngine/AD7.Impl/AD7Engine.cs +++ b/src/MIDebugEngine/AD7.Impl/AD7Engine.cs @@ -216,6 +216,7 @@ public int Jump(ulong address) _engineCallback.OnError(EngineUtils.GetExceptionDescription(e)); return Constants.E_ABORT; } + DebuggedProcess.ThreadCache.MarkDirty(); return Constants.S_OK; } diff --git a/src/OpenDebugAD7/AD7DebugSession.cs b/src/OpenDebugAD7/AD7DebugSession.cs index 473148194..763544443 100644 --- a/src/OpenDebugAD7/AD7DebugSession.cs +++ b/src/OpenDebugAD7/AD7DebugSession.cs @@ -1355,7 +1355,7 @@ protected override void HandleGotoRequestAsync(IRequestResponder if (!m_threads.TryGetValue(responder.Arguments.ThreadId, out thread)) throw new AD7Exception("Unknown thread id: " + responder.Arguments.ThreadId.ToString(CultureInfo.InvariantCulture)); } - BeforeContinue(); + //BeforeContinue(); builder.CheckHR(thread.SetNextStatement(null, gotoTarget)); } }