示例#1
0
 /// <summary>
 /// Creates a DataTarget from a crash dump, specifying the dump reader to use.
 /// </summary>
 /// <param name="fileName">The crash dump's filename.</param>
 /// <param name="dumpReader">The type of dump reader to use.</param>
 /// <returns>A DataTarget instance.</returns>
 public static DataTarget LoadCrashDump(string fileName, CrashDumpReader dumpReader)
 {
     if (dumpReader == CrashDumpReader.DbgEng)
     {
         DbgEngDataReader reader = new DbgEngDataReader(fileName);
         return(CreateFromReader(reader, reader.DebuggerInterface));
     }
     else
     {
         DumpDataReader reader = new DumpDataReader(fileName);
         return(CreateFromReader(reader, null));
     }
 }
示例#2
0
        public async Task<bool> LoadDump(string fileName, CrashDumpReader readerType)
        {
            if (IsAttached)
                return true;

            DumpReader = readerType;
            if (readerType == CrashDumpReader.DbgEng)
            {
                return await _workerTask.ContinueWith(task => LoadDump(fileName));
            }

            return await Task.Run(() => LoadDump(fileName)).ConfigureAwait(false);
        }
示例#3
0
        public async Task <bool> LoadDump(string fileName, CrashDumpReader readerType)
        {
            if (IsAttached)
            {
                return(true);
            }

            DumpReader = readerType;
            if (readerType == CrashDumpReader.DbgEng)
            {
                return(await _workerTask.ContinueWith(task => LoadDump(fileName)));
            }

            return(await Task.Run(() => LoadDump(fileName)).ConfigureAwait(false));
        }
示例#4
0
 /// <summary>
 /// Creates a DataTarget from a crash dump, specifying the dump reader to use.
 /// </summary>
 /// <param name="fileName">The crash dump's filename.</param>
 /// <param name="dumpReader">The type of dump reader to use.</param>
 /// <returns>A DataTarget instance.</returns>
 public static DataTarget LoadCrashDump(string fileName, CrashDumpReader dumpReader)
 {
     if (dumpReader == CrashDumpReader.DbgEng)
     {
         DbgEngDataReader reader = new DbgEngDataReader(fileName);
         return CreateFromReader(reader, reader.DebuggerInterface);
     }
     else
     {
         DumpDataReader reader = new DumpDataReader(fileName);
         return CreateFromReader(reader, null);
     }
 }