@Test
	public void testWriteEmuRegisterAfterStep() throws Throwable {
		createAndOpenTrace();
		controlService.setCurrentMode(tb.trace, ControlMode.RW_TRACE);

		TraceObjectThread thread;
		try (Transaction tx = tb.startTransaction()) {
			// NB. TraceManager should automatically activate the first thread
			thread = tb.createObjectsProcessAndThreads();
			tb.createObjectsFramesAndRegs(thread, Lifespan.nowOn(0), getPlatform(), 1);
			Assembler asm = Assemblers.getAssembler(getPlatform().getLanguage());
			AssemblyBuffer buf = new AssemblyBuffer(asm, tb.addr(getPlatform(), 0x00400000));
			buf.assemble("imm r0,#123");
			tb.trace.getMemoryManager()
					.putBytes(0, tb.addr(0x00400000), ByteBuffer.wrap(buf.getBytes()));
			tb.exec(getPlatform(), 0, thread, 0, "pc = 0x00400000;");
		}
		activateTrace();
		controlService.setCurrentMode(tb.trace, ControlMode.RW_EMULATOR);
		waitForSwing();

		TraceSchedule step1 = TraceSchedule.snap(0).steppedForward(thread, 1);
		traceManager.activateTime(step1);
		waitForPass(() -> assertEquals(step1, traceManager.getCurrent().getTime()));

		StateEditor editor = createStateEditor();
		assertTrue(editor.isRegisterEditable(r0));
		waitOn(editor.setRegister(rv1234));
		waitForSwing();

		DebuggerCoordinates current = traceManager.getCurrent();
		assertEquals(0, current.getSnap()); // Chain edits, don't source from scratch
		long snap = current.getViewSnap();
		assertTrue(Lifespan.isScratch(snap));

		RegisterValue value = tb.trace.getMemoryManager()
				.getMemoryRegisterSpace(thread, false)
				.getValue(getPlatform(), snap, r0);
		assertEquals(rv1234, value);
	}
TODO: It'd be nice if this worked, since memory edits don't really require a thread
context. That would require some changes in the TraceSchedule and its execution. IINM,
each step currently requires a thread. We'd have to relax that for patch steps, and it'd
only work if they don't refer to any register.
Ghidra/Test/DebuggerIntegrationTest/src/test/java/ghidra/app/plugin/core/debug/service/control/DebuggerControlServiceTest.java