@Override
		public void run(TaskMonitor monitor) throws CancelledException {

			monitor.setIndeterminate(true);

			Listing listing = program.getListing();
			CodeUnitIterator it = listing.getCodeUnits(addresses, true);
			while (it.hasNext()) {
				if (monitor.isCancelled()) {
					return;
				}

				CodeUnit cu = it.next();

				InstructionMetadata instructionMetadata;

				// If this CU is an instruction, we can use the Sleigh debug logger to build the 
				// mask info.  If not, we don't need to create anything complex for masking - it's 
				// either on or off.
				if (cu instanceof Instruction) {
					SleighDebugLogger logger =
						new SleighDebugLogger(program, cu.getAddress(), SleighDebugMode.VERBOSE);
					if (logger.parseFailed()) {
						Msg.showError(this, null, "Parsing error",
							"Error parsing instruction: " + cu.toString());
						return;
					}

					instructionMetadata = getInstructionMetadata(logger, cu);
					if (instructionMetadata != null) {
						instructions.add(instructionMetadata);
					}
					processOperands(logger, cu, instructionMetadata);

				}
				else if (cu instanceof Data) {
					try {
						instructionMetadata = getInstructionMetadata(cu);
						if (instructionMetadata != null) {
							instructions.add(instructionMetadata);
						}
					}
					catch (InvalidInputException e) {
						Msg.showError(this, null, "Parsing error",
							"Error parsing data: " + cu.toString());
						return;
					}
				}
			}
		}
Examines the given addresses from the given program to extract all instructions; results are 
stored in the local {@link InstructionMetadata} list.

@param program the current program
@param addresses the addresses to load instructions for
@throws InvalidInputException if there's an error parsing the instructions
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/model/InstructionSearchData.java