public static DWARFLocationList readV4(BinaryReader reader, DWARFCompilationUnit cu)
			throws IOException {
		List<DWARFLocation> results = new ArrayList<>();

		byte pointerSize = cu.getPointerSize();
		long baseAddress = cu.getPCRange().getFrom();
		long maxAddrVal = pointerSize == 4 ? NumericUtilities.MAX_UNSIGNED_INT32_AS_LONG : -1;

		while (reader.hasNext()) {
			// Read the beginning and ending addresses
			long beginning = reader.readNextUnsignedValue(pointerSize);
			long ending = reader.readNextUnsignedValue(pointerSize); // dwarf end addrs are exclusive

			// End of the list
			if (beginning == 0 && ending == 0) {
				break;
			}

			// Check to see if this is a base address entry
			if (beginning == maxAddrVal) {
				baseAddress = ending;
				continue;
			}

			int size = reader.readNextUnsignedShort();
			byte[] expr = reader.readNextByteArray(size);

			if (beginning == ending) {
				// skip adding empty ranges because Ghidra can't use them
				continue;
			}

			DWARFRange range = new DWARFRange(baseAddress + beginning, baseAddress + ending);
			results.add(new DWARFLocation(range, expr));
		}
		return new DWARFLocationList(results);
	}
Read a v4 {@link DWARFLocationList} from the debug_loc section.

@param reader stream positioned at the start of a .debug_loc 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