public static DWARFCompilationUnit readV4(DWARFUnitHeader partial, BinaryReader reader,
			BinaryReader abbrReader, TaskMonitor monitor)
			throws DWARFException, IOException, CancelledException {

		long abbreviationOffset = reader.readNextUnsignedValue(partial.getIntSize());
		byte pointerSize = reader.readNextByte();
		long firstDIEOffset = reader.getPointerIndex();

		if (firstDIEOffset > partial.endOffset) {
			throw new IOException("Invalid length %d for DWARF Compilation Unit at 0x%x"
					.formatted(partial.endOffset - partial.startOffset, partial.startOffset));
		}
		else if (firstDIEOffset == partial.endOffset) {
			// silently skip this empty compunit
			return null;
		}

		abbrReader.setPointerIndex(abbreviationOffset);
		Map<Integer, DWARFAbbreviation> abbrMap =
			DWARFAbbreviation.readAbbreviations(abbrReader, partial.dprog, monitor);

		DWARFCompilationUnit cu =
			new DWARFCompilationUnit(partial, pointerSize, firstDIEOffset, abbrMap);
		return cu;
	}
Creates a new {@link DWARFCompilationUnit} by reading a compilationUnit's header data
from the debug_info section and the debug_abbr section and its compileUnit DIE (ie.
the first DIE right after the header).
<p>
Returns {@code NULL} if there was an ignorable error while reading the compilation unit (and
leaves the input stream at the next compilation unit to read), otherwise throws
an IOException if there was an unrecoverable error.
<p>
Also returns {@code NULL} (and leaves the stream at EOF) if the remainder of the stream 
is filled with null bytes.
 
@param partial already read partial unit header
@param reader .debug_info BinaryReader 
@param abbrReader .debug_abbr BinaryReader
@param monitor the current task monitor
@return the read compilation unit, or null if the compilation unit was bad/empty and should 
be ignored
@throws DWARFException if an invalid or unsupported DWARF version is read.
@throws IOException if the length of the compilation unit is invalid.
@throws CancelledException if the task has been canceled.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFCompilationUnit.java