GP-5796: Write event thread down in emulated snapshots.

This commit is contained in:
Dan
2025-07-01 18:15:47 +00:00
parent 2727715539
commit f74b783b3e
3 changed files with 5 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ public class SnapshotRow {
if (thread != null) {
return thread;
}
return getTime().getEventThread(trace);
return getTime().getLastThread(trace);
}
public String getEventThreadName() {

View File

@@ -736,6 +736,8 @@ public class DebuggerEmulationServicePlugin extends Plugin implements DebuggerEm
destSnap.setDescription("Emulated");
try {
ce.emulator().writeDown(key.platform, destSnap.getKey(), key.time.getSnap());
TraceThread lastThread = key.time.getLastThread(key.trace);
destSnap.setEventThread(lastThread);
}
catch (Throwable e) {
Msg.showError(this, null, "Emulate",

View File

@@ -645,7 +645,8 @@ public class ProgramEmulationUtils {
pc.getAddressSpace().isOverlaySpace() ? List.of(pc.getAddressSpace())
: List.of();
loadExecutable(initial, program, overlays);
doLaunchEmulationThread(trace, snap, program, pc, pc);
TraceThread thread = doLaunchEmulationThread(trace, snap, program, pc, pc);
initial.setEventThread(thread);
}
trace.clearUndo();
success = true;