private long getOffset(byte[] bytes, int ordinal) {
		int index = pointerSize * ordinal;
		if (pointerSize == 4) {
			return dataConverter.getInt(bytes, index);
		}
		else if (pointerSize == 8) {
			return dataConverter.getLong(bytes, index);
		}
		else {
			return 0;
		}
	}
Developer script to capture items from Program and PDB for developing tests
Ghidra/Features/PDB/developer_scripts/CaptureHelperScript.java