From 4898c572986aacaa66d7ad4f21fb75ecc2bd483e Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Sat, 28 Apr 2018 16:26:33 +0200 Subject: [PATCH 01/10] Switch to latest minor version of c# --- .../DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj | 1 + MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj index 35e9526..ea1329a 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj @@ -46,6 +46,7 @@ true prompt MinimumRecommendedRules.ruleset + latest bin\x64\Release\ diff --git a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj index b83c143..8c1421e 100644 --- a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj +++ b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj @@ -47,6 +47,7 @@ prompt MinimumRecommendedRules.ruleset true + latest bin\x64\Release\ From 0f0ea7ee7afc7480645717114d8d5e0f3bd0cda7 Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Fri, 21 Dec 2018 10:38:32 +0200 Subject: [PATCH 02/10] Added ThreadNamesStream to dbghelp --- .../DbgHelp.MinidumpFiles.csproj | 2 ++ .../DbgHelp.MinidumpFiles/MiniDumpFile.cs | 20 ++++++++++++ .../MiniDumpStreamType.cs | 2 ++ .../MiniDumpThreadName.cs | 27 ++++++++++++++++ .../MiniDumpThreadNamesStream.cs | 32 +++++++++++++++++++ .../DbgHelp.MinidumpFiles/Native/dbghelp.cs | 28 ++++++++++++++++ 6 files changed, 111 insertions(+) create mode 100644 MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadName.cs create mode 100644 MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadNamesStream.cs diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj index ea1329a..3795d7f 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj @@ -114,6 +114,8 @@ + + diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs index 2e9d9af..417d0d2 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs @@ -400,6 +400,26 @@ public MiniDumpSystemMemoryInfo ReadSystemMemoryInfo() return new MiniDumpSystemMemoryInfo(systemMemoryInfo, this); } + public MiniDumpThreadNamesStream ReadThreadNamesStream() + { + MINIDUMP_THREAD_NAME_LIST threadNameStream; + IntPtr streamPointer; + uint streamSize; + + if (!this.ReadStream(MINIDUMP_STREAM_TYPE.ThreadNamesStream, out threadNameStream, out streamPointer, out streamSize)) + { + return new MiniDumpThreadNamesStream(); // Return empty result + } + + // Advance the stream pointer past the header + streamPointer += Marshal.SizeOf(threadNameStream.NumberOfThreadNames); + + // Now read the information + MINIDUMP_THREAD_NAME[] threadNames = ReadArray(streamPointer, (int)threadNameStream.NumberOfThreadNames); + + return new MiniDumpThreadNamesStream(threadNameStream, threadNames, this); + } + public unsafe void CopyMemoryFromOffset(ulong rva, IntPtr destination, uint size) { try diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpStreamType.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpStreamType.cs index 36c682a..7533a76 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpStreamType.cs +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpStreamType.cs @@ -33,6 +33,8 @@ public enum MiniDumpStreamType SystemMemoryInfoStream = 21, ProcessVmCountersStream = 22, + ThreadNamesStream = 24, + LastReservedStream = 0xffff } } diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadName.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadName.cs new file mode 100644 index 0000000..590f853 --- /dev/null +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadName.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using DbgHelp.MinidumpFiles.Native; + +namespace DbgHelp.MinidumpFiles +{ + /// + /// Contains information about a thread's name/description. + /// + public class MiniDumpThreadName + { + private MINIDUMP_THREAD_NAME _threadName; + private MiniDumpFile _owner; + + internal MiniDumpThreadName(MINIDUMP_THREAD_NAME threadName, MiniDumpFile owner) + { + this._threadName = threadName; + this._owner = owner; + } + + public uint ThreadId => _threadName.ThreadId; + public string Name => _owner.ReadString(_threadName.RvaOfThreadName); + } +} diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadNamesStream.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadNamesStream.cs new file mode 100644 index 0000000..3bf7697 --- /dev/null +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpThreadNamesStream.cs @@ -0,0 +1,32 @@ +using DbgHelp.MinidumpFiles.Native; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DbgHelp.MinidumpFiles +{ + /// + /// The thread names stream in a minidump, containing information about each thread's name/description (if available). + /// + public class MiniDumpThreadNamesStream + { + private MINIDUMP_THREAD_NAME_LIST _threadNamesList; + private List _threadNameEntries; + + internal MiniDumpThreadNamesStream() + { + _threadNamesList = new MINIDUMP_THREAD_NAME_LIST(); + _threadNameEntries = new List(); + } + + internal MiniDumpThreadNamesStream(MINIDUMP_THREAD_NAME_LIST threadNamesList, MINIDUMP_THREAD_NAME[] threadNameEntries, MiniDumpFile owner) + { + _threadNamesList = threadNamesList; + _threadNameEntries = new List(threadNameEntries.Select(x => new MiniDumpThreadName(x, owner))); + } + + public IReadOnlyCollection Entries => _threadNameEntries; + } +} diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/Native/dbghelp.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/Native/dbghelp.cs index 39f462f..9d9364c 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/Native/dbghelp.cs +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/Native/dbghelp.cs @@ -1023,6 +1023,32 @@ internal struct MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION public UInt64 SharedCommittedPages; } + + /* + typedef struct _MINIDUMP_THREAD_NAME_LIST { + ULONG NumberOfThreadNames; + MINIDUMP_THREAD_NAME ThreadNames[0]; // Variable size buffer + } MINIDUMP_THREAD_NAME_LIST, *PMINIDUMP_THREAD_NAME_LIST; + */ + [StructLayout(LayoutKind.Sequential, Pack = 4)] + internal struct MINIDUMP_THREAD_NAME_LIST + { + public uint NumberOfThreadNames; + } + + /* + typedef struct _MINIDUMP_THREAD_NAME { + ULONG ThreadId; + RVA64 RvaOfThreadName; + } MINIDUMP_THREAD_NAME, *PMINIDUMP_THREAD_NAME; + */ + [StructLayout(LayoutKind.Sequential, Pack = 4)] + internal struct MINIDUMP_THREAD_NAME + { + public uint ThreadId; + public uint RvaOfThreadName; + } + public enum MINIDUMP_STREAM_TYPE : uint { UnusedStream = 0, @@ -1050,6 +1076,8 @@ public enum MINIDUMP_STREAM_TYPE : uint SystemMemoryInfoStream = 21, ProcessVmCountersStream = 22, + ThreadNamesStream = 24, + LastReservedStream = 0xffff } From f15049486322d87e21442223ba4eac8d995217fb Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Fri, 21 Dec 2018 10:40:08 +0200 Subject: [PATCH 03/10] Added view for ThreadNamesStream --- MinidumpExplorer/MinidumpExplorer/MainForm.cs | 6 + .../MinidumpExplorer/MainForm.designer.cs | 29 +++-- .../MinidumpExplorer/MainForm.resx | 2 +- .../MinidumpExplorer/MinidumpExplorer.csproj | 13 +- .../Views/ThreadNamesView.Designer.cs | 79 ++++++++++++ .../MinidumpExplorer/Views/ThreadNamesView.cs | 46 +++++++ .../Views/ThreadNamesView.resx | 120 ++++++++++++++++++ 7 files changed, 282 insertions(+), 13 deletions(-) create mode 100644 MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.Designer.cs create mode 100644 MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.cs create mode 100644 MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.resx diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.cs b/MinidumpExplorer/MinidumpExplorer/MainForm.cs index b01b616..5e29b57 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.cs +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.cs @@ -212,6 +212,12 @@ private void CmdDisplayStream(string streamName) numberOfItems = threadInfoData.Length; viewToDisplay = new ThreadInfoListView(threadInfoData); break; + case "ThreadNames": + nodeText = "ThreadNames"; + MiniDumpThreadNamesStream threadNamesStream = this._miniDumpFile.ReadThreadNamesStream(); + numberOfItems = threadNamesStream.Entries.Count; + viewToDisplay = new ThreadNamesView(threadNamesStream); + break; case "Memory": nodeText = "Memory"; MiniDumpMemoryDescriptor[] memoryData = this._miniDumpFile.ReadMemoryList(); diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs b/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs index 872cb30..cafc38b 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs @@ -43,8 +43,9 @@ private void InitializeComponent() System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("SystemMemoryInfo", 3, 3); System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("Threads", 1, 1); System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("ThreadInfo", 1, 1); - System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("UnloadedModules", 2, 2); - System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("", new System.Windows.Forms.TreeNode[] { + System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("ThreadNames", 1, 1); + System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("UnloadedModules", 2, 2); + System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, @@ -56,7 +57,8 @@ private void InitializeComponent() treeNode9, treeNode10, treeNode11, - treeNode12}); + treeNode12, + treeNode13}); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.treeView1 = new System.Windows.Forms.TreeView(); @@ -158,17 +160,22 @@ private void InitializeComponent() treeNode11.SelectedImageIndex = 1; treeNode11.Tag = "ThreadInfo"; treeNode11.Text = "ThreadInfo"; - treeNode12.ImageIndex = 2; + treeNode12.ImageIndex = 1; treeNode12.Name = "Node0"; - treeNode12.SelectedImageIndex = 2; - treeNode12.Tag = "UnloadedModules"; - treeNode12.Text = "UnloadedModules"; - treeNode13.ImageIndex = 0; + treeNode12.SelectedImageIndex = 1; + treeNode12.Tag = "ThreadNames"; + treeNode12.Text = "ThreadNames"; + treeNode13.ImageIndex = 2; treeNode13.Name = "Node0"; - treeNode13.Tag = "Summary"; - treeNode13.Text = ""; + treeNode13.SelectedImageIndex = 2; + treeNode13.Tag = "UnloadedModules"; + treeNode13.Text = "UnloadedModules"; + treeNode14.ImageIndex = 0; + treeNode14.Name = "Node0"; + treeNode14.Tag = "Summary"; + treeNode14.Text = ""; this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode13}); + treeNode14}); this.treeView1.SelectedImageIndex = 0; this.treeView1.ShowNodeToolTips = true; this.treeView1.Size = new System.Drawing.Size(238, 705); diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.resx b/MinidumpExplorer/MinidumpExplorer/MainForm.resx index 72fa4ec..e774342 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.resx +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACa - DAAAAk1TRnQBSQFMAgEBBwEAAeABAAHgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + DAAAAk1TRnQBSQFMAgEBBwEAAegBAAHoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj index 8c1421e..fec1939 100644 --- a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj +++ b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj @@ -191,6 +191,12 @@ SystemMemoryInfoView.cs + + UserControl + + + ThreadNamesView.cs + UserControl @@ -291,6 +297,9 @@ SystemMemoryInfoView.cs + + ThreadNamesView.cs + UnloadedModulesView.cs @@ -318,7 +327,9 @@ ThreadListView.cs - + + Designer + SettingsSingleFileGenerator diff --git a/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.Designer.cs b/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.Designer.cs new file mode 100644 index 0000000..e24e279 --- /dev/null +++ b/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.Designer.cs @@ -0,0 +1,79 @@ +namespace MinidumpExplorer.Views +{ + partial class ThreadNamesView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.idHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.nameHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.idHeader, + this.nameHeader}); + this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView1.FullRowSelect = true; + this.listView1.Location = new System.Drawing.Point(0, 0); + this.listView1.MultiSelect = false; + this.listView1.Name = "listView1"; + this.listView1.ShowGroups = false; + this.listView1.Size = new System.Drawing.Size(919, 334); + this.listView1.TabIndex = 1; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // idHeader + // + this.idHeader.Text = "Id"; + this.idHeader.Width = 120; + // + // nameHeader + // + this.nameHeader.Text = "Name"; + this.nameHeader.Width = 600; + // + // ThreadNamesView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listView1); + this.Name = "ThreadNamesView"; + this.Size = new System.Drawing.Size(919, 334); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ColumnHeader idHeader; + private System.Windows.Forms.ColumnHeader nameHeader; + } +} \ No newline at end of file diff --git a/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.cs b/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.cs new file mode 100644 index 0000000..c827f56 --- /dev/null +++ b/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.cs @@ -0,0 +1,46 @@ +using DbgHelp.MinidumpFiles; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MinidumpExplorer.Views +{ + public partial class ThreadNamesView : UserControl // BaseViewControl + { + private MiniDumpThreadNamesStream _threadNamesStream; + + public ThreadNamesView() + { + InitializeComponent(); + } + + public ThreadNamesView(MiniDumpThreadNamesStream threadNamesStream) + : this() + { + this._threadNamesStream = threadNamesStream; + + if (_threadNamesStream.Entries.Count == 0) + { + this.listView1.Items.Add("No data found for stream"); + } + else + { + foreach (MiniDumpThreadName thread in _threadNamesStream.Entries) + { + ListViewItem newItem = new ListViewItem("0x" + thread.ThreadId.ToString("x8") + " (" + thread.ThreadId + ")"); + newItem.SubItems.Add(thread.Name); + + newItem.Tag = thread; + + this.listView1.Items.Add(newItem); + } + } + } + } +} diff --git a/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.resx b/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MinidumpExplorer/MinidumpExplorer/Views/ThreadNamesView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file From 5c09754fc7372ea7dae99f1fd84a5d34248d111d Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Sat, 22 Dec 2018 16:47:20 +0200 Subject: [PATCH 04/10] Added reading of CommentW stream to dbghelp --- .../DbgHelp.MinidumpFiles.csproj | 1 + .../MiniDumpCommentStreamW.cs | 20 ++++++++++ .../DbgHelp.MinidumpFiles/MiniDumpFile.cs | 37 +++++++++++++++++-- 3 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpCommentStreamW.cs diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj index 3795d7f..de22e48 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj @@ -90,6 +90,7 @@ + diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpCommentStreamW.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpCommentStreamW.cs new file mode 100644 index 0000000..c21d77c --- /dev/null +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpCommentStreamW.cs @@ -0,0 +1,20 @@ +namespace DbgHelp.MinidumpFiles +{ + /// + /// The comment string that was written to the dump file. + /// + public class MiniDumpCommentStreamW + { + internal MiniDumpCommentStreamW() + { + this.Comment = null; + } + + internal MiniDumpCommentStreamW(string comment) + { + this.Comment = comment; + } + + public string Comment { get; private set; } + } +} \ No newline at end of file diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs index 417d0d2..c4b7439 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs @@ -420,6 +420,25 @@ public MiniDumpThreadNamesStream ReadThreadNamesStream() return new MiniDumpThreadNamesStream(threadNameStream, threadNames, this); } + /// + /// Reads the MINIDUMP_STREAM_TYPE.CommentStreamW stream. + /// + /// containing the comment for the minidump. If stream data is not present then is returned with a null Comment property. + public MiniDumpCommentStreamW ReadCommentStreamW() + { + IntPtr streamPointer; + uint streamSize; + + if (!this.ReadStream(MINIDUMP_STREAM_TYPE.CommentStreamW, out streamPointer, out streamSize)) + { + return new MiniDumpCommentStreamW(); // Return empty result + } + + string comment = Marshal.PtrToStringAuto(streamPointer, (int)streamSize); + + return new MiniDumpCommentStreamW(comment); + } + public unsafe void CopyMemoryFromOffset(ulong rva, IntPtr destination, uint size) { try @@ -465,8 +484,21 @@ protected unsafe bool ReadStream(MINIDUMP_STREAM_TYPE streamToRead, out T str protected unsafe bool ReadStream(MINIDUMP_STREAM_TYPE streamToRead, out T streamData, out IntPtr streamPointer, out uint streamSize) { - MINIDUMP_DIRECTORY directory = new MINIDUMP_DIRECTORY(); streamData = default(T); + + if (ReadStream(streamToRead, out streamPointer, out streamSize)) + { + streamData = (T)Marshal.PtrToStructure(streamPointer, typeof(T)); + + return true; + } + + return false; + } + + protected unsafe bool ReadStream(MINIDUMP_STREAM_TYPE streamToRead, out IntPtr streamPointer, out uint streamSize) + { + MINIDUMP_DIRECTORY directory = new MINIDUMP_DIRECTORY(); streamPointer = IntPtr.Zero; streamSize = 0; @@ -489,9 +521,6 @@ protected unsafe bool ReadStream(MINIDUMP_STREAM_TYPE streamToRead, out T str else throw new Win32Exception(lastError); } - - streamData = (T)Marshal.PtrToStructure(streamPointer, typeof(T)); - } finally { From 7402f8d7e408d221c260c529fa4ef2e7d3e21aff Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Sat, 22 Dec 2018 16:49:21 +0200 Subject: [PATCH 05/10] Added UI for viewing CommentW stream --- MinidumpExplorer/MinidumpExplorer/MainForm.cs | 6 + .../MinidumpExplorer/MainForm.designer.cs | 141 +++++++++--------- .../MinidumpExplorer/MainForm.resx | 2 +- .../MinidumpExplorer/MinidumpExplorer.csproj | 9 ++ .../Views/CommentStreamWView.cs | 41 +++++ .../Views/CommentStreamWView.designer.cs | 78 ++++++++++ .../Views/CommentStreamWView.resx | 120 +++++++++++++++ 7 files changed, 329 insertions(+), 68 deletions(-) create mode 100644 MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.cs create mode 100644 MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.designer.cs create mode 100644 MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.resx diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.cs b/MinidumpExplorer/MinidumpExplorer/MainForm.cs index 5e29b57..b49d85e 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.cs +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.cs @@ -268,6 +268,12 @@ private void CmdDisplayStream(string streamName) numberOfItems = 1; viewToDisplay = new SystemMemoryInfoView(systemMemoryInfo); break; + case "CommentW": + nodeText = "CommentW"; + MiniDumpCommentStreamW commentWStream = this._miniDumpFile.ReadCommentStreamW(); + numberOfItems = 1; + viewToDisplay = new CommentStreamWView(commentWStream); + break; } if (viewToDisplay != null) diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs b/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs index cafc38b..73a05a5 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.designer.cs @@ -32,20 +32,21 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Exception", 6, 6); - System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Handles", 4, 4); - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Memory", 3, 3); - System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Memory64", 3, 3); - System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("MemoryInfo", 3, 3); - System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("MiscInfo", 5, 5); - System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("Modules", 2, 2); - System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("SystemInfo"); - System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("SystemMemoryInfo", 3, 3); - System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("Threads", 1, 1); - System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("ThreadInfo", 1, 1); - System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("ThreadNames", 1, 1); - System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("UnloadedModules", 2, 2); - System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("", new System.Windows.Forms.TreeNode[] { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("CommentW", 5, 5); + System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Exception", 6, 6); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Handles", 4, 4); + System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Memory", 3, 3); + System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Memory64", 3, 3); + System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("MemoryInfo", 3, 3); + System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("MiscInfo", 5, 5); + System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("Modules", 2, 2); + System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("SystemInfo"); + System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("SystemMemoryInfo", 3, 3); + System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("Threads", 1, 1); + System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("ThreadInfo", 1, 1); + System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("ThreadNames", 1, 1); + System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("UnloadedModules", 2, 2); + System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, @@ -58,7 +59,8 @@ private void InitializeComponent() treeNode10, treeNode11, treeNode12, - treeNode13}); + treeNode13, + treeNode14}); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.treeView1 = new System.Windows.Forms.TreeView(); @@ -105,77 +107,82 @@ private void InitializeComponent() this.treeView1.ImageList = this.treeViewImageList; this.treeView1.Location = new System.Drawing.Point(0, 0); this.treeView1.Name = "treeView1"; - treeNode1.ImageIndex = 6; + treeNode1.ImageIndex = 5; treeNode1.Name = "Node0"; - treeNode1.SelectedImageIndex = 6; - treeNode1.Tag = "Exception"; - treeNode1.Text = "Exception"; - treeNode2.ImageIndex = 4; + treeNode1.SelectedImageIndex = 5; + treeNode1.Tag = "CommentW"; + treeNode1.Text = "CommentW"; + treeNode2.ImageIndex = 6; treeNode2.Name = "Node0"; - treeNode2.SelectedImageIndex = 4; - treeNode2.Tag = "Handles"; - treeNode2.Text = "Handles"; - treeNode3.ImageIndex = 3; + treeNode2.SelectedImageIndex = 6; + treeNode2.Tag = "Exception"; + treeNode2.Text = "Exception"; + treeNode3.ImageIndex = 4; treeNode3.Name = "Node0"; - treeNode3.SelectedImageIndex = 3; - treeNode3.Tag = "Memory"; - treeNode3.Text = "Memory"; + treeNode3.SelectedImageIndex = 4; + treeNode3.Tag = "Handles"; + treeNode3.Text = "Handles"; treeNode4.ImageIndex = 3; treeNode4.Name = "Node0"; treeNode4.SelectedImageIndex = 3; - treeNode4.Tag = "Memory64"; - treeNode4.Text = "Memory64"; + treeNode4.Tag = "Memory"; + treeNode4.Text = "Memory"; treeNode5.ImageIndex = 3; treeNode5.Name = "Node0"; treeNode5.SelectedImageIndex = 3; - treeNode5.Tag = "MemoryInfo"; - treeNode5.Text = "MemoryInfo"; - treeNode6.ImageIndex = 5; + treeNode5.Tag = "Memory64"; + treeNode5.Text = "Memory64"; + treeNode6.ImageIndex = 3; treeNode6.Name = "Node0"; - treeNode6.SelectedImageIndex = 5; - treeNode6.Tag = "MiscInfo"; - treeNode6.Text = "MiscInfo"; - treeNode7.ImageIndex = 2; - treeNode7.Name = "Node2"; - treeNode7.SelectedImageIndex = 2; - treeNode7.Tag = "Modules"; - treeNode7.Text = "Modules"; - treeNode8.ImageIndex = 5; - treeNode8.Name = "Node0"; - treeNode8.SelectedImageKey = "DialogID_6220_16x.png"; - treeNode8.Tag = "SystemInfo"; - treeNode8.Text = "SystemInfo"; - treeNode9.ImageIndex = 3; + treeNode6.SelectedImageIndex = 3; + treeNode6.Tag = "MemoryInfo"; + treeNode6.Text = "MemoryInfo"; + treeNode7.ImageIndex = 5; + treeNode7.Name = "Node0"; + treeNode7.SelectedImageIndex = 5; + treeNode7.Tag = "MiscInfo"; + treeNode7.Text = "MiscInfo"; + treeNode8.ImageIndex = 2; + treeNode8.Name = "Node2"; + treeNode8.SelectedImageIndex = 2; + treeNode8.Tag = "Modules"; + treeNode8.Text = "Modules"; + treeNode9.ImageIndex = 5; treeNode9.Name = "Node0"; - treeNode9.SelectedImageIndex = 3; - treeNode9.Tag = "SystemMemoryInfo"; - treeNode9.Text = "SystemMemoryInfo"; - treeNode10.ImageIndex = 1; - treeNode10.Name = "Node1"; - treeNode10.SelectedImageIndex = 1; - treeNode10.Tag = "Threads"; - treeNode10.Text = "Threads"; + treeNode9.SelectedImageKey = "DialogID_6220_16x.png"; + treeNode9.Tag = "SystemInfo"; + treeNode9.Text = "SystemInfo"; + treeNode10.ImageIndex = 3; + treeNode10.Name = "Node0"; + treeNode10.SelectedImageIndex = 3; + treeNode10.Tag = "SystemMemoryInfo"; + treeNode10.Text = "SystemMemoryInfo"; treeNode11.ImageIndex = 1; - treeNode11.Name = "Node0"; + treeNode11.Name = "Node1"; treeNode11.SelectedImageIndex = 1; - treeNode11.Tag = "ThreadInfo"; - treeNode11.Text = "ThreadInfo"; + treeNode11.Tag = "Threads"; + treeNode11.Text = "Threads"; treeNode12.ImageIndex = 1; treeNode12.Name = "Node0"; treeNode12.SelectedImageIndex = 1; - treeNode12.Tag = "ThreadNames"; - treeNode12.Text = "ThreadNames"; - treeNode13.ImageIndex = 2; + treeNode12.Tag = "ThreadInfo"; + treeNode12.Text = "ThreadInfo"; + treeNode13.ImageIndex = 1; treeNode13.Name = "Node0"; - treeNode13.SelectedImageIndex = 2; - treeNode13.Tag = "UnloadedModules"; - treeNode13.Text = "UnloadedModules"; - treeNode14.ImageIndex = 0; + treeNode13.SelectedImageIndex = 1; + treeNode13.Tag = "ThreadNames"; + treeNode13.Text = "ThreadNames"; + treeNode14.ImageIndex = 2; treeNode14.Name = "Node0"; - treeNode14.Tag = "Summary"; - treeNode14.Text = ""; + treeNode14.SelectedImageIndex = 2; + treeNode14.Tag = "UnloadedModules"; + treeNode14.Text = "UnloadedModules"; + treeNode15.ImageIndex = 0; + treeNode15.Name = "Node0"; + treeNode15.Tag = "Summary"; + treeNode15.Text = ""; this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode14}); + treeNode15}); this.treeView1.SelectedImageIndex = 0; this.treeView1.ShowNodeToolTips = true; this.treeView1.Size = new System.Drawing.Size(238, 705); diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.resx b/MinidumpExplorer/MinidumpExplorer/MainForm.resx index e774342..f4b793b 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.resx +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACa - DAAAAk1TRnQBSQFMAgEBBwEAAegBAAHoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + DAAAAk1TRnQBSQFMAgEBBwEAAfABAAHwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj index fec1939..a1286c1 100644 --- a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj +++ b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj @@ -173,6 +173,12 @@ MemoryInfoView.cs + + UserControl + + + CommentStreamWView.cs + UserControl @@ -288,6 +294,9 @@ MemoryInfoView.cs + + CommentStreamWView.cs + MiscInfoView.cs diff --git a/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.cs b/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.cs new file mode 100644 index 0000000..0de2987 --- /dev/null +++ b/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using DbgHelp.MinidumpFiles; + +namespace MinidumpExplorer.Views +{ + public partial class CommentStreamWView : BaseViewControl + { + private MiniDumpCommentStreamW _commentWStream; + + public CommentStreamWView() + { + InitializeComponent(); + } + + public CommentStreamWView(MiniDumpCommentStreamW commentWStream) + : this() + { + _commentWStream = commentWStream; + + if (commentWStream.Comment == null) + AddInfoNode("No data found for stream", ""); + else + AddInfoNode("Comment", _commentWStream.Comment); + } + + private void AddInfoNode(string label, string value) + { + ListViewItem newItem; + newItem = new ListViewItem(label); + newItem.SubItems.Add(value); + this.listView1.Items.Add(newItem); + } + } +} diff --git a/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.designer.cs b/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.designer.cs new file mode 100644 index 0000000..be2529f --- /dev/null +++ b/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.designer.cs @@ -0,0 +1,78 @@ +namespace MinidumpExplorer.Views +{ + partial class CommentStreamWView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView1.FullRowSelect = true; + this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.listView1.Location = new System.Drawing.Point(0, 0); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(805, 432); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "Field"; + this.columnHeader1.Width = 223; + // + // columnHeader2 + // + this.columnHeader2.Text = "Value"; + this.columnHeader2.Width = 508; + // + // MiscInfoView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listView1); + this.Name = "MiscInfoView"; + this.Size = new System.Drawing.Size(805, 432); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + } +} diff --git a/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.resx b/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.resx new file mode 100644 index 0000000..d58980a --- /dev/null +++ b/MinidumpExplorer/MinidumpExplorer/Views/CommentStreamWView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file From 4f809fa24e496d6d6e4e855e4f90cd1d56b1290a Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Fri, 28 Dec 2018 15:35:22 +0200 Subject: [PATCH 06/10] Updated dump flags --- MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpType.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpType.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpType.cs index 9141248..dc026ad 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpType.cs +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpType.cs @@ -119,7 +119,8 @@ public enum MiniDumpType MiniDumpFilterTriage = 0x00100000, MiniDumpWithAvxXStateContext = 0x00200000, - MiniDumpValidTypeFlags = 0x003fffff + MiniDumpWithIptTrace = 0x00400000, + MiniDumpValidTypeFlags = 0x007fffff } } From 2dc54a702657c102d1d7324d19539b0e3789d0d3 Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Fri, 28 Dec 2018 16:20:10 +0200 Subject: [PATCH 07/10] Fixed link in About dialog box --- .../MinidumpExplorer/Dialogs/AboutDialog.Designer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MinidumpExplorer/MinidumpExplorer/Dialogs/AboutDialog.Designer.cs b/MinidumpExplorer/MinidumpExplorer/Dialogs/AboutDialog.Designer.cs index dc0b757..6e5981a 100644 --- a/MinidumpExplorer/MinidumpExplorer/Dialogs/AboutDialog.Designer.cs +++ b/MinidumpExplorer/MinidumpExplorer/Dialogs/AboutDialog.Designer.cs @@ -49,7 +49,7 @@ private void InitializeComponent() // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.okButton.Location = new System.Drawing.Point(311, 216); + this.okButton.Location = new System.Drawing.Point(346, 237); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(87, 27); this.okButton.TabIndex = 24; @@ -86,7 +86,7 @@ private void InitializeComponent() this.labelVersion.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0); this.labelVersion.MaximumSize = new System.Drawing.Size(0, 20); this.labelVersion.Name = "labelVersion"; - this.labelVersion.Size = new System.Drawing.Size(46, 15); + this.labelVersion.Size = new System.Drawing.Size(45, 15); this.labelVersion.TabIndex = 26; this.labelVersion.Text = "Version"; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -109,10 +109,10 @@ private void InitializeComponent() this.linkLabel1.Location = new System.Drawing.Point(157, 159); this.linkLabel1.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0); this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(185, 15); + this.linkLabel1.Size = new System.Drawing.Size(282, 15); this.linkLabel1.TabIndex = 29; this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "http://minidumps.codeplex.com/"; + this.linkLabel1.Text = "https://github.com/GregTheDev/MinidumpExplorer"; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // panel1 @@ -172,7 +172,7 @@ private void InitializeComponent() this.AcceptButton = this.okButton; this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(419, 256); + this.ClientSize = new System.Drawing.Size(454, 277); this.Controls.Add(this.linkLabel2); this.Controls.Add(this.panel1); this.Controls.Add(this.linkLabel1); From b4e78460311d6fa08d612f947d72f3366f512d1e Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Fri, 28 Dec 2018 16:43:47 +0200 Subject: [PATCH 08/10] Bumped to .Net 4.6.1 --- .../DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj | 3 ++- MinidumpExplorer/MinidumpExplorer/App.config | 10 +++++----- .../MinidumpExplorer/MinidumpExplorer.csproj | 7 +++++-- .../MinidumpExplorer/Properties/Resources.Designer.cs | 2 +- .../MinidumpExplorer/Properties/Settings.Designer.cs | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj index de22e48..d5a921f 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/DbgHelp.MinidumpFiles.csproj @@ -9,12 +9,13 @@ Properties DbgHelp.MinidumpFiles DbgHelp.MinidumpFiles - v4.5 + v4.6.1 512 SAK SAK SAK SAK + true diff --git a/MinidumpExplorer/MinidumpExplorer/App.config b/MinidumpExplorer/MinidumpExplorer/App.config index 094ccdc..363e31a 100644 --- a/MinidumpExplorer/MinidumpExplorer/App.config +++ b/MinidumpExplorer/MinidumpExplorer/App.config @@ -1,12 +1,12 @@ - + - -
+ +
- + @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj index a1286c1..a5e4b3b 100644 --- a/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj +++ b/MinidumpExplorer/MinidumpExplorer/MinidumpExplorer.csproj @@ -9,12 +9,13 @@ Properties MinidumpExplorer MinidumpExplorer - v4.5 + v4.6.1 512 SAK SAK SAK SAK + AnyCPU @@ -351,7 +352,9 @@ - + + Designer + diff --git a/MinidumpExplorer/MinidumpExplorer/Properties/Resources.Designer.cs b/MinidumpExplorer/MinidumpExplorer/Properties/Resources.Designer.cs index 6652810..05e184c 100644 --- a/MinidumpExplorer/MinidumpExplorer/Properties/Resources.Designer.cs +++ b/MinidumpExplorer/MinidumpExplorer/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace MinidumpExplorer.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/MinidumpExplorer/MinidumpExplorer/Properties/Settings.Designer.cs b/MinidumpExplorer/MinidumpExplorer/Properties/Settings.Designer.cs index 4470900..ae4f1cc 100644 --- a/MinidumpExplorer/MinidumpExplorer/Properties/Settings.Designer.cs +++ b/MinidumpExplorer/MinidumpExplorer/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace MinidumpExplorer.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); From 60b8bd55133847e562c11624db1a148c17e1612d Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Sun, 30 Dec 2018 12:29:12 +0200 Subject: [PATCH 09/10] Fixed display of item count when no comment stream is present --- MinidumpExplorer/MinidumpExplorer/MainForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MinidumpExplorer/MinidumpExplorer/MainForm.cs b/MinidumpExplorer/MinidumpExplorer/MainForm.cs index b49d85e..59279ac 100644 --- a/MinidumpExplorer/MinidumpExplorer/MainForm.cs +++ b/MinidumpExplorer/MinidumpExplorer/MainForm.cs @@ -271,7 +271,7 @@ private void CmdDisplayStream(string streamName) case "CommentW": nodeText = "CommentW"; MiniDumpCommentStreamW commentWStream = this._miniDumpFile.ReadCommentStreamW(); - numberOfItems = 1; + numberOfItems = string.IsNullOrEmpty(commentWStream.Comment) ? 0 : 1; viewToDisplay = new CommentStreamWView(commentWStream); break; } From 8ff749a6c95f2d8daf20d6c42c06105c398967cb Mon Sep 17 00:00:00 2001 From: Greg Nagel Date: Mon, 31 Dec 2018 12:31:29 +0200 Subject: [PATCH 10/10] Bumped file versions to 0.8 --- .../DbgHelp.MinidumpFiles/Properties/AssemblyInfo.cs | 6 +++--- .../MinidumpExplorer/Properties/AssemblyInfo.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MinidumpExplorer/DbgHelp.MinidumpFiles/Properties/AssemblyInfo.cs b/MinidumpExplorer/DbgHelp.MinidumpFiles/Properties/AssemblyInfo.cs index 4049557..eaa685b 100644 --- a/MinidumpExplorer/DbgHelp.MinidumpFiles/Properties/AssemblyInfo.cs +++ b/MinidumpExplorer/DbgHelp.MinidumpFiles/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DbgHelp.MinidumpFiles")] -[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.7.0.0")] -[assembly: AssemblyFileVersion("0.7.0.0")] +[assembly: AssemblyVersion("0.8.0.0")] +[assembly: AssemblyFileVersion("0.8.0.0")] diff --git a/MinidumpExplorer/MinidumpExplorer/Properties/AssemblyInfo.cs b/MinidumpExplorer/MinidumpExplorer/Properties/AssemblyInfo.cs index 0e84136..211ee69 100644 --- a/MinidumpExplorer/MinidumpExplorer/Properties/AssemblyInfo.cs +++ b/MinidumpExplorer/MinidumpExplorer/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Minidump Explorer")] -[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.7.0.0")] -[assembly: AssemblyFileVersion("0.7.0.0")] +[assembly: AssemblyVersion("0.8.0.0")] +[assembly: AssemblyFileVersion("0.8.0.0")]