public static DWARFLocationList readV5(BinaryReader reader, DWARFCompilationUnit cu)
			throws IOException {
		long baseAddr = cu.getPCRange().getFrom();
		DWARFProgram dprog = cu.getProgram();

		List<DWARFLocation> list = new ArrayList<>();
		while (reader.hasNext()) {
			int lleId = reader.readNextUnsignedByte();
			if (lleId == DW_LLE_end_of_list) {
				break;
			}
			switch (lleId) {
				case DW_LLE_base_addressx: {
					int addrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					baseAddr = dprog.getAddress(DW_FORM_addrx, addrIndex, cu);
					break;
				}
				case DW_LLE_startx_endx: {
					int startAddrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					int endAddrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					byte[] expr = reader.readNext(DWARFLocationList::uleb128SizedByteArray);
					long start = dprog.getAddress(DW_FORM_addrx, startAddrIndex, cu);
					long end = dprog.getAddress(DW_FORM_addrx, endAddrIndex, cu);
					list.add(new DWARFLocation(start, end, expr));
					break;
				}
				case DW_LLE_startx_length: {
					int startAddrIndex = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					int len = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					byte[] expr = reader.readNext(DWARFLocationList::uleb128SizedByteArray);
					long start = dprog.getAddress(DW_FORM_addrx, startAddrIndex, cu);
					list.add(new DWARFLocation(start, start + len, expr));
					break;
				}
				case DW_LLE_offset_pair: {
					int startOfs = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					int endOfs = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					byte[] expr = reader.readNext(DWARFLocationList::uleb128SizedByteArray);
					list.add(new DWARFLocation(baseAddr + startOfs, baseAddr + endOfs, expr));
					break;
				}
				case DW_LLE_default_location: {
					byte[] expr = reader.readNext(DWARFLocationList::uleb128SizedByteArray);
					list.add(new DWARFLocation(DWARFRange.EMPTY, expr));
					break;
				}
				case DW_LLE_base_address: {
					baseAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					break;
				}
				case DW_LLE_start_end: {
					long startAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					long endAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					byte[] expr = reader.readNext(DWARFLocationList::uleb128SizedByteArray);
					list.add(new DWARFLocation(startAddr, endAddr, expr));
					break;
				}
				case DW_LLE_start_length: {
					long startAddr = reader.readNextUnsignedValue(cu.getPointerSize());
					int len = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
					byte[] expr = reader.readNext(DWARFLocationList::uleb128SizedByteArray);
					list.add(new DWARFLocation(startAddr, startAddr + len, expr));
					break;
				}
				default:
					throw new IOException(
						"Unsupported DWARF Location List Entry type: %d".formatted(lleId));
			}
		}
		return new DWARFLocationList(list);
	}
Reads a v5 {@link DWARFLocationList} from the debug_loclists stream.

@param reader stream positioned at the start of a .debug_loclists location list
@param cu the compUnit that refers to the location list
@return list of DWARF locations (address range and location expression)
@throws IOException if an I/O error occurs
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFLocationList.java