/// <summary> /// Create a program debug database from the given executable stream. /// </summary> /// <param name="dataType">The type of data to load from the stream.</param> /// <param name="stream">A stream containing the executable bytes.</param> /// <returns>A new <see cref="IProgramDebugData"/> instance of the given <paramref name="dataType"/>.</returns> public static IProgramDebugData Load( DebugDataType dataType, Stream stream ) { switch( dataType ) { case DebugDataType.Elf: ElfDebugData edd = new ElfDebugData( stream ); return edd; case DebugDataType.Symbols: SimpleElfDebugData sdd = new SimpleElfDebugData( stream ); return sdd; default: throw new NotImplementedException(); } }
/// <summary> /// Create a program debug database from the given executable stream. /// </summary> /// <param name="dataType">The type of data to load from the stream.</param> /// <param name="stream">A stream containing the executable bytes.</param> /// <returns>A new <see cref="IProgramDebugData"/> instance of the given <paramref name="dataType"/>.</returns> public static IProgramDebugData Load(DebugDataType dataType, Stream stream) { switch (dataType) { case DebugDataType.Elf: ElfDebugData edd = new ElfDebugData(stream); return(edd); case DebugDataType.Symbols: SimpleElfDebugData sdd = new SimpleElfDebugData(stream); return(sdd); default: throw new NotImplementedException(); } }