public static DWARFRangeList readV5(BinaryReader reader, DWARFCompilationUnit cu)
			throws IOException {

		List<DWARFRange> list = new ArrayList<>();

		DWARFProgram dprog = cu.getProgram();
		long baseAddr = cu.getPCRange().getFrom();

		while (reader.hasNext()) {
			int rleId = reader.readNextUnsignedByte();
			if (rleId == DW_RLE_end_of_list) {
				break;
			}
			switch (rleId) {
				case DW_RLE_base_addressx: {
					int addrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					baseAddr = dprog.getAddress(DW_FORM_addrx, addrIndex, cu);
					break;
				}
				case DW_RLE_startx_endx: {
					int startAddrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					int endAddrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					long start = dprog.getAddress(DW_FORM_addrx, startAddrIndex, cu);
					long end = dprog.getAddress(DW_FORM_addrx, endAddrIndex, cu);
					list.add(new DWARFRange(start, end));
					break;
				}
				case DW_RLE_startx_length: {
					int startAddrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					int len = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					long start = dprog.getAddress(DW_FORM_addrx, startAddrIndex, cu);
					list.add(new DWARFRange(start, start + len));
					break;
				}
				case DW_RLE_offset_pair: {
					int startOfs = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					int endOfs = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					list.add(new DWARFRange(baseAddr+startOfs, baseAddr+endOfs));
					break;
				}
				case DW_RLE_base_address: {
					baseAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					break;
				}
				case DW_RLE_start_end: {
					long startAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					long endAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					list.add(new DWARFRange(startAddr, endAddr));
					break;
				}
				case DW_RLE_start_length: {
					long startAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					int len = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					list.add(new DWARFRange(startAddr, startAddr + len));
					break;
				}
				default:
					throw new IOException(
						"Unsupported DWARF Range List Entry type: %d".formatted(rleId));
			}
		}
		return new DWARFRangeList(list);
	}
Reads a v5 {@link DWARFRangeList} from the .debug_rnglists stream.

@param reader stream positioned to the start of a .debug_rnglists range list
@param cu the compUnit referring to this range
@return new {@link DWARFRangeList}, never null
@throws IOException if error reading
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFRangeList.java