@Override
	public String getDisassembly(CodeUnit cu) throws Exception {

		GdisConfig gdisConfig = checkLanguage(cu.getProgram().getLanguage());
		if (gdisConfig == null || gdisConfig.architecture == UNSUPPORTED) {
			return null;
		}

		long addressOffset = cu.getAddress().getAddressableWordOffset();
		String address = "0x" + Long.toHexString(addressOffset);

		// for aligned languages, don't try on non-aligned locations.
		if (cu.getMinAddress().getOffset() %
			cu.getProgram().getLanguage().getInstructionAlignment() != 0) {
			return "";
		}

		String bytes = getBytes(cu, NUM_BYTES);
		if (bytes == null) {
			return "";
		}

		String disOptions = EMPTY_DISASSEMBLER_OPTIONS;
		String globalOptions = gdisConfig.getGlobalDisassemblerOptions();
		boolean hasGlobal = false;
		if (globalOptions != null) {
			hasGlobal = true;
			//set the disOptions to the global options here in case there are global
			//options but no options for context register values
			disOptions = globalOptions;
		}
		Register contextRegister = gdisConfig.getContextRegister();
		if (contextRegister != null) {
			long value = getContextRegisterValue(cu, contextRegister);
			String contextRegisterValueOption = gdisConfig.getOptionsMap().get(value);
			if (contextRegisterValueOption == null) {
				Msg.warn(this, "No option for value " + value + " of context register " +
					contextRegister.getName());
			}
			else {
				//need to put a comma between the global options and the options
				//for this context register value
				if (hasGlobal) {
					disOptions = globalOptions + "," + contextRegisterValueOption;
				}
				//no global options, just send the options for this context register
				else {
					disOptions = contextRegisterValueOption;
				}
			}
		}
		List<GnuDisassembledInstruction> disassembly =
			runDisassembler(gdisConfig, address, bytes, disOptions);

		if (disassembly == null || disassembly.size() == 0 || disassembly.get(0) == null) {
			return "(bad)";
		}
		return disassembly.get(0).toString();
	}
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