public PdbDebugInfo parse(AbstractPdb pdb) throws IOException, PdbException {
		PdbDebugInfo debugInfo;
		try {
			int streamNumber = getStreamNumber();
			// Only reading 8-bytes - no need for monitor
			PdbByteReader reader =
				pdb.getReaderForStreamNumber(streamNumber, 0, 8);
			if (reader.getLimit() == 0) {
				return null;
			}

			// In support of debug.
			debugReader = reader;
			PdbLog.message(this::debugDump);

			int headerSignature = reader.parseInt();
			int versionNumber = reader.parseInt();

			if (headerSignature == DBIHDR700_SIG) {
				switch (versionNumber) {
					case DBI41_ID:
					case DBI50_ID:
					case DBI60_ID:
					case DBI70_ID:
					case DBI110_ID:
						debugInfo = new PdbNewDebugInfo(pdb, streamNumber);
						break;
					default:
						throw new PdbException("Unknown DBI Version");
				}
			}
			else {
				debugInfo = new PdbOldDebugInfo(pdb, streamNumber);
			}
		}
		catch (CancelledException e) {
			throw new AssertException();
		}
		return debugInfo;
	}
Parses information to determine the version of debug info to create
@param pdb {@link AbstractPdb} that owns this debug info
@return {@link PdbDebugInfo} of the appropriate debug info or null if the stream does not
have enough information to be parsed
@throws IOException on file seek or read, invalid parameters, bad file configuration, or
 inability to read required bytes
@throws PdbException upon error in processing components
Ghidra/Features/PDB/src/main/java/ghidra/app/util/bin/format/pdb2/pdbreader/PdbDebugInfoParser.java