Merge remote-tracking branch 'origin/GP-853_d-millar_memory_notifications--REBASED' into patch

This commit is contained in:
ghidra1 2021-10-01 10:48:56 -04:00
commit 9509ec1b98
14 changed files with 287 additions and 41 deletions

View file

@ -111,7 +111,6 @@ public class GdbModelImpl extends AbstractDebuggerObjectModel {
break;
}
case RUNNING: {
session.invalidateMemoryAndRegisterCaches();
session.setAccessible(false);
break;
}

View file

@ -441,9 +441,13 @@ public class GdbModelTargetInferior
inferiorRunning(sco.getReason());
List<Object> params = new ArrayList<>();
gatherThreads(params, sco.getAffectedThreads());
if (targetEventThread == null && !params.isEmpty()) {
targetEventThread = threads.getTargetThread(sco.getAffectedThreads().iterator().next());
}
if (targetEventThread != null) {
impl.session.getListeners().fire.event(impl.session, targetEventThread,
TargetEventType.RUNNING, "Running", params);
invalidateMemoryAndRegisterCaches();
}
}
if (sco.getState() != GdbState.STOPPED) {

View file

@ -181,6 +181,8 @@ public class GdbModelTargetProcessMemory
});
}
// TODO: Seems this is only called when sco.getState() == STOPPED.
// Maybe should name it such
public CompletableFuture<Void> stateChanged(GdbStateChangeRecord sco) {
return requestElements(false).thenCompose(__ -> {
AsyncFence fence = new AsyncFence();