public static DWARFAddressListHeader read(BinaryReader reader, int defaultIntSize)
			throws IOException {
		// length : dwarf_length
		// version : 2 bytes
		// addr_size : 1 byte
		// seg_sel_size : 1 byte

		long startOffset = reader.getPointerIndex();
		DWARFLengthValue lengthInfo = DWARFLengthValue.read(reader, defaultIntSize);
		if (lengthInfo == null) {
			return null;
		}

		long endOffset = reader.getPointerIndex() + lengthInfo.length();
		short version = reader.readNextShort();
		if (version != 5) {
			throw new DWARFException("Unsupported DWARF version [%d]".formatted(version));
		}
		int addressSize = reader.readNextUnsignedByte();
		int segmentSelectorSize = reader.readNextUnsignedByte();
		long firstAddr = reader.getPointerIndex();
		reader.setPointerIndex(endOffset);

		int count = (int) ((endOffset - firstAddr) / (addressSize + segmentSelectorSize));
		return new DWARFAddressListHeader(startOffset, endOffset, firstAddr, addressSize,
			segmentSelectorSize, count);
	}
Reads a {@link DWARFAddressListHeader} from the stream.

@param reader {@link BinaryReader} stream
@param defaultIntSize native int size for the binary
@return {@link DWARFAddressListHeader}, or null if end-of-list marker
@throws IOException if error reading
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFAddressListHeader.java