private List<GnuDisassembledInstruction> runDisassembler(GdisConfig gdisConfig,
			String addrString, String bytes, String disassemblerOptions) throws IOException {

		// if this is the first time running the disassembler process, or a
		// parameter has changed (notably, not the address--we pass that in
		// every time)
		boolean sameConfig = gdisConfig.equals(currentConfig);
		if (sameConfig && hadFailure) {
			return null;
		}

		if (disassemblerProcess == null || !sameConfig) {

			if (!setupDisassembler(gdisConfig)) {
				return null;
			}

			outputWriter = new OutputStreamWriter(disassemblerProcess.getOutputStream());

			InputStreamReader inStreamReader =
				new InputStreamReader(disassemblerProcess.getInputStream());
			buffReader = new BufferedReader(inStreamReader);

			ExternalStreamHandler errorHandler =
				new ExternalStreamHandler(disassemblerProcess.getErrorStream());
			errorHandler.start();
		}

		if (!disassemblerProcess.isAlive()) {
			return null; // if process previously died return nothing - quickly
		}

		String disassemblyRequest = addrString + SEPARATOR_CHARACTER + bytes;
		if (StringUtils.isEmpty(disassemblerOptions)) {
			disassemblyRequest += '\n';
		}
		else {
			disassemblyRequest += OPTIONS_SEPARATOR + disassemblerOptions + SEPARATOR_CHARACTER;
		}

		try {
			outputWriter.write(disassemblyRequest);
			outputWriter.flush();
			return getDisassembledInstruction();
		}
		catch (IOException e) {
			// force a restart of the disassembler on next call to this function
			// TODO: Should we not do this to avoid repeated failure and severe slowdown?
			// User must exit or switch configs/programs to retry after failure
			//disassemblerProcess.destroy();
			//disassemblerProcess = null; // assumes process exit
			Msg.error(this, "Last gdis request failed: " + disassemblyRequest);
			throw new IOException("gdis execution error", e);
		}
	}
Get detailed instruction list for a block of instructions.

@param lang
           processor language (corresponding LanguageID must be defined
           within LanguageMap.txt)
@param blockAddr
           start of block ( must be true: (offset & -(2^blockSizeFactor)
           == offset)
@param blockSizeFactor
           the block size factor where blockSize = 2^blockSizeFactor
           (must be > 0)
@param byteProvider
           provider for block of bytes to be disassembled starting at
           offset 0
@return list of instructions or null if language not supported by GNU
        Disassembler
@throws Exception
Ghidra/Extensions/SleighDevTools/src/main/java/ghidra/app/util/disassemble/GNUExternalDisassembler.java