private DWARFDataType makeDataTypeForArray(DIEAggregate diea)
			throws IOException, DWARFExpressionException {

		DWARFDataType elementType = getDataType(diea.getTypeRef(), voidDDT);
		// do a second query to see if there was a recursive loop in the call above back
		// to this datatype that resulted in this datatype being created.
		// Use that instance if possible.
		DWARFDataType self = dieOffsetToDataTypeMap.get(diea.getOffset());
		if (self != null) {
			return self;
		}
		DataType elementDT = fixupDataTypeInconsistencies(elementType);

		long explictArraySize = diea.getUnsignedLong(DW_AT_byte_size, -1);
		if (elementType.dataType.isZeroLength() || explictArraySize == 0) {
			// don't bother checking range info, we are going to force a zero-element array
			DataType zeroLenArray = new ArrayDataType(elementDT, 0, -1, dataTypeManager);
			return new DWARFDataType(zeroLenArray, null, diea.getOffset());
		}

		// Build a list of the defined dimensions for this array type.
		// The first element in the DWARF dimension list would be where a wild-card (-1 length)
		// dimension would be defined.
		List<Integer> dimensions = new ArrayList<>();
		List<DebugInfoEntry> subrangeDIEs = diea.getChildren(DW_TAG_subrange_type);
		for (int subRangeDIEIndex = 0; subRangeDIEIndex < subrangeDIEs.size(); subRangeDIEIndex++) {
			DIEAggregate subrangeAggr = prog.getAggregate(subrangeDIEs.get(subRangeDIEIndex));
			long numElements = -1;
			try {
				if (subrangeAggr.hasAttribute(DW_AT_count)) {
					numElements =
						subrangeAggr.parseUnsignedLong(DW_AT_count, 0xbadbeef);
				}
				// Otherwise check for an upper bound
				else if (subrangeAggr.hasAttribute(DW_AT_upper_bound)) {
					long upperBound =
						subrangeAggr.parseUnsignedLong(DW_AT_upper_bound, 0xbadbeef);

					// fix special flag values used by DWARF to indicate that the array dimension
					// is unknown.  64bit 0xffffff...s and 32bit 0xffff..s will
					// be forced to 0.
					if (upperBound == 0xFF_FF_FF_FFL /* ie. max uint32 */ || upperBound == -1) {
						upperBound = 0;
					}
					else {
						numElements = upperBound + 1;
					}
				}
			}
			catch (UnsupportedOperationException | IOException | IndexOutOfBoundsException
					| DWARFExpressionException e) {
				// ignore
			}

			if (numElements == -1) {
				numElements = 0;
			}
			else if (numElements > Integer.MAX_VALUE) {
				Msg.error(this, "Bad value [" + numElements + "] for array's size in DIE: " +
					diea.getHexOffset() + ", forcing to 1");
				numElements = 1;
			}

			dimensions.add((int) numElements);
		}

		DataType dt = elementDT;
		for (int i = dimensions.size() - 1; i >= 0; i--) {
			int numElements = dimensions.get(i);
			ArrayDataType subArray =
				new ArrayDataType(dt, numElements, -1, dataTypeManager);
			if (dt == elementDT) {
				updateMapping(dt, subArray.getDataType());
			}
			dt = subArray;
		}

		DWARFDataType result = new DWARFDataType(dt, null, diea.getOffset());

		return result;
	}
Returns true if the DWARF struct is larger than Ghidra allows (ie. bigger than MAX_INT).

@param structSize long int size of the DWARF struct
@return true if bigger than Ghidra can handle
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFDataTypeImporter.java