public static String getFormattedInstructionDetails(Instruction instruction,
			SleighDebugLogger debug) {
		if (instruction == null) {
			return null;
		}

		StringBuffer textBuf = new StringBuffer("Instruction Summary");
		textBuf.append("\n-------------------");
		textBuf.append("\nMnemonic          : " + instruction.getMnemonicString());
		textBuf.append("\nNumber of Operands: " + instruction.getNumOperands());
		textBuf.append("\nAddress           : " + instruction.getMinAddress().toString(true));
		FlowType flowType = instruction.getFlowType();
		textBuf.append("\nFlow Type         : " + flowType.toString());
		FlowOverride flowOverride = instruction.getFlowOverride();
		if (flowOverride != FlowOverride.NONE && instruction.getPrototype()
				.getFlowType(instruction.getInstructionContext()) != flowType) {
			textBuf.append("\n  >>> reflects " + flowOverride + " flow override");
		}
		Address fallAddr = instruction.getFallThrough();
		textBuf.append("\nFallthrough       : " + (fallAddr != null ? fallAddr : "<none>"));
		if (instruction.isFallThroughOverridden()) {
			textBuf.append("\n  >>> reflects fallthrough override");
		}
		textBuf.append("\nDelay slot depth  : " + instruction.getDelaySlotDepth() +
			(instruction.isInDelaySlot() ? " in slot" : ""));
		textBuf.append(
			"\nHash              : " + Integer.toHexString(instruction.getPrototype().hashCode()))
				.append('\n');

		textBuf.append("\nInput Objects:\n" +
			getString(getFormatedInstructionObjects(instruction, true), true));
		textBuf.append("\nResult Objects:\n" +
			getString(getFormatedInstructionObjects(instruction, false), true));
		textBuf.append(
			"\nConstructor Line #'s:\n" + getString(debug.getConstructorLineNumbers(), true))
				.append('\n');
		int len = instruction.getLength();
		textBuf.append("\nByte Length : " + len);
		if (instruction.isLengthOverridden()) {
			textBuf.append("\n  >>> reflects length override, actual length is " +
				instruction.getParsedLength());
		}
		try {
			byte[] bytes = instruction.getParsedBytes();
			textBuf.append(
				"\nInstr Bytes : " + SleighDebugLogger.getFormattedBytes(bytes));
			textBuf.append("\nMask        : " + debug.getFormattedInstructionMask(-1));
			textBuf.append("\nMasked Bytes: " + debug.getFormattedMaskedValue(-1)).append('\n');
		}
		catch (MemoryAccessException e) {
			// ignore
		}
		textBuf.append("\nInstr Context:\n");
		textBuf.append(getFormattedContextRegisterValueBreakout(instruction, "   "));

		return textBuf.toString();
	}
Get details instruction info as formatted text
@param instruction
@param debug SleighDebugerLogger for specified instruction or null 
@return instruction details
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/InstructionUtils.java