From 218e9d5582f97e7d7b7cd117be7e61a10d7707bb Mon Sep 17 00:00:00 2001 From: d-millar <33498836+d-millar@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:18:16 +0000 Subject: [PATCH] GP-3899: refresh memory for everything except step --- .../java/agent/dbgeng/manager/impl/DbgManagerImpl.java | 4 ++++ .../model/impl/DbgModelTargetProcessContainerImpl.java | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/manager/impl/DbgManagerImpl.java b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/manager/impl/DbgManagerImpl.java index a0cf23b1a8..f67bb70e51 100644 --- a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/manager/impl/DbgManagerImpl.java +++ b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/manager/impl/DbgManagerImpl.java @@ -1795,5 +1795,9 @@ public class DbgManagerImpl implements DbgManager { getEventListeners().fire.threadSelected(eventThread, null, Causes.UNCLAIMED); } } + + public DebugStatus getStatus() { + return status; + } } diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelTargetProcessContainerImpl.java b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelTargetProcessContainerImpl.java index c68a08b3de..2c678bcfc9 100644 --- a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelTargetProcessContainerImpl.java +++ b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelTargetProcessContainerImpl.java @@ -21,6 +21,7 @@ import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; +import agent.dbgeng.dbgeng.DebugClient.DebugStatus; import agent.dbgeng.dbgeng.DebugModuleInfo; import agent.dbgeng.dbgeng.DebugProcessId; import agent.dbgeng.dbgeng.DebugThreadId; @@ -113,6 +114,12 @@ public class DbgModelTargetProcessContainerImpl extends DbgModelTargetObjectImpl DbgReason reason) { DbgModelTargetProcess process = getTargetProcess(thread.getProcess()); process.threadStateChangedSpecific(thread, state); + if (!getManager().getStatus().equals(DebugStatus.STEP_INTO)) { + DbgModelTargetMemoryContainer memory = process.getMemory(); + if (memory != null) { + memory.requestElements(RefreshBehavior.REFRESH_ALWAYS); + } + } } @Override