public DBTraceInstruction addInstruction(long snap, Address start, TracePlatform platform)
			throws CodeUnitInsertionException {
		DBTraceCodeManager code = trace.getCodeManager();
		Language platformLanguage = platform.getLanguage();
		Disassembler dis =
			Disassembler.getDisassembler(platformLanguage, platformLanguage.getAddressFactory(),
				new ConsoleTaskMonitor(), msg -> Msg.info(this, "Listener: " + msg));
		RegisterValue defaultContextValue = trace.getRegisterContextManager()
				.getDefaultContext(platformLanguage)
				.getDefaultDisassemblyContext();

		MemBuffer memBuf = platform.getMappedMemBuffer(snap, platform.mapHostToGuest(start));
		InstructionBlock block = dis.pseudoDisassembleBlock(memBuf, defaultContextValue, 1);
		Instruction pseudoIns = block.iterator().next();
		return code.instructions()
				.create(Lifespan.nowOn(snap), start, platform, pseudoIns.getPrototype(), pseudoIns,
					0);
	}
Create an instruction unit by disassembling existing bytes

@param snap the starting snap
@param start the min address
@param platform the platform for the language to disassemble
@return the instruction unit
@throws CodeUnitInsertionException if the instruction cannot be created
Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/ToyDBTraceBuilder.java