public DbgEngDataReader(string dumpFile) { if (!File.Exists(dumpFile)) { throw new FileNotFoundException(dumpFile); } IDebugClient client = CreateIDebugClient(); int hr = client.OpenDumpFile(dumpFile); if (hr != 0) { throw new ClrDiagnosticsException(String.Format("Could not load crash dump '{0}', HRESULT: 0x{1:x8}", dumpFile, hr), ClrDiagnosticsException.HR.DebuggerError); } CreateClient(client); // This actually "attaches" to the crash dump. m_control.WaitForEvent(0, 0xffffffff); }
public DbgEngDataReader(string dumpFile) { if (!File.Exists(dumpFile)) { throw new FileNotFoundException(dumpFile); } IDebugClient client = CreateIDebugClient(); int hr = client.OpenDumpFile(dumpFile); if (hr != 0) { var kind = (uint)hr == 0x80004005 ? ClrDiagnosticsExceptionKind.CorruptedFileOrUnknownFormat : ClrDiagnosticsExceptionKind.DebuggerError; throw new ClrDiagnosticsException($"Could not load crash dump, HRESULT: 0x{hr:x8}", kind, hr).AddData("DumpFile", dumpFile); } CreateClient(client); // This actually "attaches" to the crash dump. _control.WaitForEvent(0, 0xffffffff); }