private void bootstrapCompilationUnits(TaskMonitor monitor)
			throws CancelledException, IOException, DWARFException {

		debugInfoBR.setPointerIndex(0);
		monitor.initialize(debugInfoBR.length(), "DWARF: Bootstrapping Compilation Units");
		while (debugInfoBR.hasNext()) {
			monitor.checkCancelled();
			monitor.setProgress(debugInfoBR.getPointerIndex());
			monitor.setMessage("DWARF: Bootstrapping Compilation Unit #" + compUnits.size());

			DWARFUnitHeader unitHeader =
				DWARFUnitHeader.read(this, debugInfoBR, debugAbbrBR, compUnits.size(), monitor);
			if (unitHeader == null) {
				break;
			}

			debugInfoBR.setPointerIndex(unitHeader.getEndOffset());
			if (unitHeader instanceof DWARFCompilationUnit cu) {
				compUnits.add(cu);
				importSummary.dwarfVers.add((int) cu.getDWARFVersion());
			}
			else {
				Msg.info(this, "Unsupported unit header: " + unitHeader + " at " +
					unitHeader.getStartOffset());
			}
		}
		importSummary.compUnitCount = compUnits.size();
	}
Reads and indexes available DWARF information.

@param monitor {@link TaskMonitor}
@throws IOException if error reading data
@throws DWARFException if bad or invalid DWARF information
@throws CancelledException if cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFProgram.java