static void Main(string[] args) { Dictionary <string, int> moduleCount = new Dictionary <string, int>(); var files = Directory.GetFiles(@"c:\lbsymbol\").Where(x => x.EndsWith(".dmp")); foreach (var f in files) { using (var parser = new MiniDumpParser()) { parser.Parse(f); if (parser.ExistModuleListStream()) { for (var i = 0; i < parser.ModuleNum; ++i) { var m = parser.GetStringFromRva(parser.ModuleInfo(i).ModuleNameRva); var filename = Path.GetFileName(m).ToLower(); if (moduleCount.ContainsKey(filename)) { moduleCount[filename]++; } else { moduleCount[filename] = 1; } } } } } moduleCount .OrderByDescending(i => i.Value) .Take(30) .ToList() .ForEach(x => Console.WriteLine(x)); }
void Analyse() { _dumpParser?.Dispose(); _dumpParser = new MiniDumpParser(); _dumpParser.Parse(DumpPath); string output = ""; for (var i = 0; i < _dumpParser.ModuleNum; ++i) { var moduleName = _dumpParser.GetStringFromRva(_dumpParser.ModuleInfo(i).ModuleNameRva); output += moduleName; output += "\r\n"; } ModuleText = output; }
static void Main(string[] args) { using (var parser = new MiniDumpParser()) { if (parser.Parse(@"c:\lbsymbol\2006.dmp")) { if (parser.ExistModuleListStream()) { Console.WriteLine(parser.ModuleNum); for (var i = 0; i < 3; ++i) { var moduleName = parser.GetStringFromRva(parser.ModuleInfo(i).ModuleNameRva); Console.WriteLine(moduleName); } } if (parser.ExistThreadListStream()) { Console.WriteLine(parser.ThreadNum); for (var i = 0; i < 3; ++i) { Console.WriteLine(parser.ThreadInfo(i).ThreadId); } } if (parser.ExistMemoryListStream()) { Console.WriteLine(parser.MemoryRangeNum); for (var i = 0; i < 3; ++i) { Console.WriteLine(parser.MemoryRange(i).StartOfMemoryRange); } } if (parser.ExistExceptionStream()) { var errorCode = parser.ExceptionStream().ExceptionRecord.ExceptionCode; string errorMessage = new Win32Exception((int)errorCode).Message; Console.WriteLine(errorMessage); } if (parser.ExistSystemInfoStream()) { var si = parser.SystemInfo(); Console.WriteLine("ostarget = {0}.{1}.{2}", si.MajorVersion, si.MinorVersion, si.BuildNumber); } } } }