Mathias Kluba avatar Mathias Kluba committed 0a75114

support for Save/Load dump

Comments (0)

Files changed (11)

SOS.Net.Core/Cdb/CdbProcess.cs

             return new CdbProcess(settings, pid);
         }
 
+        /// <summary>
+        /// Create a new CdbProcess and open the dump file
+        /// </summary>
+        /// <param name="settings">settings to find CDB command line, etc.</param>
+        /// <param name="path">path to the dump file</param>
+        /// <returns>The CdbProcess attached</returns>
+        public static CdbProcess Attach(CdbSettings settings, string path)
+        {
+            return new CdbProcess(settings, path);
+        }
+
+        protected CdbProcess(CdbSettings settings, string path)
+        {
+            this.settings = settings;
+
+            var pinfo = new ProcessStartInfo
+            {
+                FileName = Path.Combine(this.settings.CdbPath, "cdb.exe"),
+                WorkingDirectory = ".",
+                Arguments = string.Format("-z \"{0}\"", path),
+                UseShellExecute = false,
+                RedirectStandardInput = true,
+                RedirectStandardOutput = true,
+                WindowStyle = ProcessWindowStyle.Hidden,
+                CreateNoWindow = true
+            };
+
+            cdb = Process.Start(pinfo);
+
+            this.Start();
+        }
+
+        public void LoadDump(string path)
+        {
+            this.ExecuteCommand(string.Format(".opendump \"{0}\"", path.Replace("\\", "\\\\")));
+        }       
+
         protected CdbProcess(CdbSettings settings, int pid)
         {
             this.settings = settings;
 
             cdb = Process.Start(pinfo);
 
+            this.Start();
+        }
+
+        private CdbProcess Start()
+        {
             this.ExecuteCommand(".loadby sos mscorwks");
 
             string sosexFullPath = this.settings.SosexPath;
                 this.ExecuteCommand(string.Format(".load \"{0}\"", sosexFullPath));
             }
 
-            this.commandHistory = new List<string>();
+            return this;
         }
 
         public IEnumerable<T> ExecuteCommand<T>(ICdbCommand<T> command)

SOS.Net/FormMain.Designer.cs

             this.columnHeaderInstanceAddress = new System.Windows.Forms.ColumnHeader();
             this.columnHeaderInstanceSite = new System.Windows.Forms.ColumnHeader();
             this.splitContainerObjectDumpDetails = new System.Windows.Forms.SplitContainer();
+            this.splitContainerObjectRef = new System.Windows.Forms.SplitContainer();
+            this.listViewObjectRef = new System.Windows.Forms.ListView();
+            this.columnHeaderObjectRefAddress = new System.Windows.Forms.ColumnHeader();
+            this.columnHeaderObjectRefType = new System.Windows.Forms.ColumnHeader();
             this.listViewObjectDump = new System.Windows.Forms.ListView();
             this.columnHeaderObjectDumpField = new System.Windows.Forms.ColumnHeader();
             this.columnHeaderObjectDumpType = new System.Windows.Forms.ColumnHeader();
             this.typesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStripButtonAttach = new System.Windows.Forms.ToolStripButton();
             this.toolStripButtonDetach = new System.Windows.Forms.ToolStripButton();
+            this.toolStripButtonOpenDump = new System.Windows.Forms.ToolStripButton();
             this.toolStripButtonSaveSettings = new System.Windows.Forms.ToolStripButton();
             this.toolStripButtonHelp = new System.Windows.Forms.ToolStripSplitButton();
             this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.helpOnlineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripButtonDump = new System.Windows.Forms.ToolStripButton();
             this.timerFilter = new System.Windows.Forms.Timer(this.components);
             this.timerTypeFilter = new System.Windows.Forms.Timer(this.components);
-            this.splitContainerObjectRef = new System.Windows.Forms.SplitContainer();
-            this.listViewObjectRef = new System.Windows.Forms.ListView();
-            this.columnHeaderObjectRefAddress = new System.Windows.Forms.ColumnHeader();
-            this.columnHeaderObjectRefType = new System.Windows.Forms.ColumnHeader();
+            this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
+            this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
             this.tabControlMain.SuspendLayout();
             this.tabPageProcesses.SuspendLayout();
             this.panelSearchProcesses.SuspendLayout();
             this.splitContainerObjectDumpDetails.Panel1.SuspendLayout();
             this.splitContainerObjectDumpDetails.Panel2.SuspendLayout();
             this.splitContainerObjectDumpDetails.SuspendLayout();
+            this.splitContainerObjectRef.Panel1.SuspendLayout();
+            this.splitContainerObjectRef.Panel2.SuspendLayout();
+            this.splitContainerObjectRef.SuspendLayout();
             this.panelObjectDumpDetails.SuspendLayout();
             this.tabPageOutput.SuspendLayout();
             this.tabPageSettings.SuspendLayout();
             this.tableLayoutPanelHELPSOSEX.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBoxHelpSOSEX)).BeginInit();
             this.toolStripSettings.SuspendLayout();
-            this.splitContainerObjectRef.Panel1.SuspendLayout();
-            this.splitContainerObjectRef.Panel2.SuspendLayout();
-            this.splitContainerObjectRef.SuspendLayout();
             this.SuspendLayout();
             // 
             // tabControlMain
             this.splitContainerObjectDumpDetails.SplitterDistance = 311;
             this.splitContainerObjectDumpDetails.TabIndex = 7;
             // 
+            // splitContainerObjectRef
+            // 
+            this.splitContainerObjectRef.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainerObjectRef.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+            this.splitContainerObjectRef.Location = new System.Drawing.Point(0, 0);
+            this.splitContainerObjectRef.Name = "splitContainerObjectRef";
+            this.splitContainerObjectRef.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainerObjectRef.Panel1
+            // 
+            this.splitContainerObjectRef.Panel1.Controls.Add(this.listViewObjectRef);
+            this.splitContainerObjectRef.Panel1Collapsed = true;
+            // 
+            // splitContainerObjectRef.Panel2
+            // 
+            this.splitContainerObjectRef.Panel2.Controls.Add(this.listViewObjectDump);
+            this.splitContainerObjectRef.Size = new System.Drawing.Size(723, 405);
+            this.splitContainerObjectRef.SplitterDistance = 105;
+            this.splitContainerObjectRef.TabIndex = 5;
+            // 
+            // listViewObjectRef
+            // 
+            this.listViewObjectRef.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeaderObjectRefAddress,
+            this.columnHeaderObjectRefType});
+            this.listViewObjectRef.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.listViewObjectRef.FullRowSelect = true;
+            this.listViewObjectRef.GridLines = true;
+            this.listViewObjectRef.HideSelection = false;
+            this.listViewObjectRef.Location = new System.Drawing.Point(0, 0);
+            this.listViewObjectRef.Name = "listViewObjectRef";
+            this.listViewObjectRef.Size = new System.Drawing.Size(150, 105);
+            this.listViewObjectRef.TabIndex = 5;
+            this.listViewObjectRef.UseCompatibleStateImageBehavior = false;
+            this.listViewObjectRef.View = System.Windows.Forms.View.Details;
+            this.listViewObjectRef.DoubleClick += new System.EventHandler(this.listViewObjectRef_DoubleClick);
+            this.listViewObjectRef.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
+            // 
+            // columnHeaderObjectRefAddress
+            // 
+            this.columnHeaderObjectRefAddress.Text = "Ref Address";
+            this.columnHeaderObjectRefAddress.Width = 137;
+            // 
+            // columnHeaderObjectRefType
+            // 
+            this.columnHeaderObjectRefType.Text = "Type";
+            this.columnHeaderObjectRefType.Width = 150;
+            // 
             // listViewObjectDump
             // 
             this.listViewObjectDump.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.toolStripSplitButtonRefresh,
             this.toolStripButtonAttach,
             this.toolStripButtonDetach,
+            this.toolStripButtonOpenDump,
+            this.toolStripButtonDump,
             this.toolStripButtonSaveSettings,
             this.toolStripButtonHelp});
             this.toolStripSettings.Location = new System.Drawing.Point(0, 0);
             this.toolStripButtonDetach.Text = "Detach";
             this.toolStripButtonDetach.Click += new System.EventHandler(this.toolStripButtonDetach_Click);
             // 
+            // toolStripButtonOpenDump
+            // 
+            this.toolStripButtonOpenDump.Image = global::SOS.Net.Properties.Resources.database_connect;
+            this.toolStripButtonOpenDump.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.toolStripButtonOpenDump.Name = "toolStripButtonOpenDump";
+            this.toolStripButtonOpenDump.Size = new System.Drawing.Size(101, 22);
+            this.toolStripButtonOpenDump.Text = "Open Dump...";
+            this.toolStripButtonOpenDump.ToolTipText = "toolStripButtonOpenDump";
+            this.toolStripButtonOpenDump.Click += new System.EventHandler(this.toolStripButtonOpenDump_Click);
+            // 
             // toolStripButtonSaveSettings
             // 
             this.toolStripButtonSaveSettings.Image = global::SOS.Net.Properties.Resources.disk;
             this.helpOnlineToolStripMenuItem.Text = "Help online...";
             this.helpOnlineToolStripMenuItem.Click += new System.EventHandler(this.helpOnlineToolStripMenuItem_Click);
             // 
+            // toolStripButtonDump
+            // 
+            this.toolStripButtonDump.Enabled = false;
+            this.toolStripButtonDump.Image = global::SOS.Net.Properties.Resources.database_save;
+            this.toolStripButtonDump.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.toolStripButtonDump.Name = "toolStripButtonDump";
+            this.toolStripButtonDump.Size = new System.Drawing.Size(96, 22);
+            this.toolStripButtonDump.Text = "Save Dump...";
+            this.toolStripButtonDump.ToolTipText = "Save Dump...";
+            this.toolStripButtonDump.Click += new System.EventHandler(this.toolStripButtonDump_Click);
+            // 
             // timerFilter
             // 
             this.timerFilter.Interval = 500;
             this.timerTypeFilter.Interval = 500;
             this.timerTypeFilter.Tick += new System.EventHandler(this.timerTypeFilter_Tick);
             // 
-            // splitContainerObjectRef
+            // saveFileDialog
             // 
-            this.splitContainerObjectRef.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.splitContainerObjectRef.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
-            this.splitContainerObjectRef.Location = new System.Drawing.Point(0, 0);
-            this.splitContainerObjectRef.Name = "splitContainerObjectRef";
-            this.splitContainerObjectRef.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            this.saveFileDialog.DefaultExt = "dmp";
+            this.saveFileDialog.Filter = "Dump files (*.dmp)|*.dmp";
             // 
-            // splitContainerObjectRef.Panel1
+            // openFileDialog
             // 
-            this.splitContainerObjectRef.Panel1.Controls.Add(this.listViewObjectRef);
-            this.splitContainerObjectRef.Panel1Collapsed = true;
-            // 
-            // splitContainerObjectRef.Panel2
-            // 
-            this.splitContainerObjectRef.Panel2.Controls.Add(this.listViewObjectDump);
-            this.splitContainerObjectRef.Size = new System.Drawing.Size(723, 405);
-            this.splitContainerObjectRef.SplitterDistance = 105;
-            this.splitContainerObjectRef.TabIndex = 5;
-            // 
-            // listViewObjectRef
-            // 
-            this.listViewObjectRef.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeaderObjectRefAddress,
-            this.columnHeaderObjectRefType});
-            this.listViewObjectRef.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.listViewObjectRef.FullRowSelect = true;
-            this.listViewObjectRef.GridLines = true;
-            this.listViewObjectRef.HideSelection = false;
-            this.listViewObjectRef.Location = new System.Drawing.Point(0, 0);
-            this.listViewObjectRef.Name = "listViewObjectRef";
-            this.listViewObjectRef.Size = new System.Drawing.Size(723, 105);
-            this.listViewObjectRef.TabIndex = 5;
-            this.listViewObjectRef.UseCompatibleStateImageBehavior = false;
-            this.listViewObjectRef.View = System.Windows.Forms.View.Details;
-            this.listViewObjectRef.DoubleClick += new System.EventHandler(this.listViewObjectRef_DoubleClick);
-            this.listViewObjectRef.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
-            // 
-            // columnHeaderObjectRefAddress
-            // 
-            this.columnHeaderObjectRefAddress.Text = "Ref Address";
-            this.columnHeaderObjectRefAddress.Width = 137;
-            // 
-            // columnHeaderObjectRefType
-            // 
-            this.columnHeaderObjectRefType.Text = "Type";
-            this.columnHeaderObjectRefType.Width = 150;
+            this.openFileDialog.DefaultExt = "dmp";
+            this.openFileDialog.Filter = "Dump files(*.dmp)|*.dmp|All files (*.*)|*.*";
             // 
             // FormMain
             // 
             this.splitContainerObjectDumpDetails.Panel1.ResumeLayout(false);
             this.splitContainerObjectDumpDetails.Panel2.ResumeLayout(false);
             this.splitContainerObjectDumpDetails.ResumeLayout(false);
+            this.splitContainerObjectRef.Panel1.ResumeLayout(false);
+            this.splitContainerObjectRef.Panel2.ResumeLayout(false);
+            this.splitContainerObjectRef.ResumeLayout(false);
             this.panelObjectDumpDetails.ResumeLayout(false);
             this.panelObjectDumpDetails.PerformLayout();
             this.tabPageOutput.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBoxHelpSOSEX)).EndInit();
             this.toolStripSettings.ResumeLayout(false);
             this.toolStripSettings.PerformLayout();
-            this.splitContainerObjectRef.Panel1.ResumeLayout(false);
-            this.splitContainerObjectRef.Panel2.ResumeLayout(false);
-            this.splitContainerObjectRef.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
 
         private System.Windows.Forms.ListView listViewObjectRef;
         private System.Windows.Forms.ColumnHeader columnHeaderObjectRefAddress;
         private System.Windows.Forms.ColumnHeader columnHeaderObjectRefType;
+        private System.Windows.Forms.ToolStripButton toolStripButtonOpenDump;
+        private System.Windows.Forms.ToolStripButton toolStripButtonDump;
+        private System.Windows.Forms.SaveFileDialog saveFileDialog;
+        private System.Windows.Forms.OpenFileDialog openFileDialog;
     }
 }
 

SOS.Net/FormMain.cs

                 this.appDomainsToolStripMenuItem.Enabled = true;
                 this.assembliesToolStripMenuItem.Enabled = true;
                 this.typesToolStripMenuItem.Enabled = true;
+                this.toolStripButtonDump.Enabled = true;
             }
             
             this.RefreshAppDomains();
         }
 
+        private void AttachDump(string path)
+        {
+            this.controller.OpenDump(path);
+
+            this.toolStripButtonAttach.Enabled = false;
+            this.toolStripButtonDetach.Enabled = true;
+            this.appDomainsToolStripMenuItem.Enabled = true;
+            this.assembliesToolStripMenuItem.Enabled = true;
+            this.typesToolStripMenuItem.Enabled = true;
+            this.toolStripButtonDump.Enabled = true;
+
+            this.RefreshAppDomains();
+        }
+
         private void FormMain_Load(object sender, EventArgs e)
         {
             var settings = this.controller.LoadSettings();
             this.assembliesToolStripMenuItem.Enabled = false;
             this.typesToolStripMenuItem.Enabled = false;
             this.toolStripButtonAttach.Enabled = listViewProcesses.SelectedIndices.Count == 1;
+            this.toolStripButtonDump.Enabled = false;
         }
 
         private void textBoxCdbInput_KeyDown(object sender, KeyEventArgs e)
                 }
             }
         }
+
+        private void toolStripButtonDump_Click(object sender, EventArgs e)
+        {
+            if(this.saveFileDialog.ShowDialog() == DialogResult.OK)
+            {
+                this.controller.SaveDump(this.saveFileDialog.FileName);                
+            }
+        }
+
+        private void toolStripButtonOpenDump_Click(object sender, EventArgs e)
+        {
+            if(this.openFileDialog.ShowDialog() == DialogResult.OK)
+            {
+                this.AttachDump(this.openFileDialog.FileName);                
+            }
+        }
     }
 }

SOS.Net/FormMain.resx

   <metadata name="timerTypeFilter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>266, 17</value>
   </metadata>
+  <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>399, 17</value>
+  </metadata>
+  <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>528, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

SOS.Net/Properties/Resources.Designer.cs

             }
         }
         
+        internal static System.Drawing.Bitmap bomb {
+            get {
+                object obj = ResourceManager.GetObject("bomb", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         internal static System.Drawing.Bitmap connect {
             get {
                 object obj = ResourceManager.GetObject("connect", resourceCulture);
             }
         }
         
+        internal static System.Drawing.Bitmap database_connect {
+            get {
+                object obj = ResourceManager.GetObject("database_connect", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap database_save {
+            get {
+                object obj = ResourceManager.GetObject("database_save", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         internal static System.Drawing.Bitmap disconnect {
             get {
                 object obj = ResourceManager.GetObject("disconnect", resourceCulture);

SOS.Net/Properties/Resources.resx

     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
   <data name="arrow_refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="LICENSE_2_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\license-2.0.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="database_save" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\database_save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="connect" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\connect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="disk" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\disk.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="connect" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\connect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="bomb" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bomb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   <data name="disconnect" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\disconnect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   <data name="resultset_next" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\resultset_next.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="LICENSE_2_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\license-2.0.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  <data name="database_connect" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\database_connect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
 </root>
Add a comment to this file

SOS.Net/Resources/bomb.png

Added
New image
Add a comment to this file

SOS.Net/Resources/database_connect.png

Added
New image
Add a comment to this file

SOS.Net/Resources/database_save.png

Added
New image

SOS.Net/SOS.Net.csproj

     </None>
     <Content Include="bug.ico" />
     <Content Include="LICENSE-2.0.txt" />
+    <None Include="Resources\database_connect.png" />
+    <None Include="Resources\database_save.png" />
+    <None Include="Resources\bomb.png" />
     <None Include="Resources\help.png" />
     <None Include="Resources\resultset_next.png" />
     <None Include="Resources\stop.png" />

SOS.Net/SosController.cs

             this.cdb.OnCdbOuput += new EventHandler<CdbEventArgs>(cdb_OnCdbOuput);
         }
 
+        public void OpenDump(string path)
+        {
+            if (this.cdb == null)
+            {
+                this.cdb = CdbProcess.Attach(this.settings, path);
+                this.cdb.OnCdbOuput += new EventHandler<CdbEventArgs>(cdb_OnCdbOuput);
+            }
+            else
+            {
+                this.cdb.LoadDump(path);
+            }
+        }
+
+        public void SaveDump(string path)
+        {
+            if(File.Exists(path))
+                File.Delete(path);
+            this.cdb.ExecuteCommand(string.Format(".dump /mfh \"{0}\"", path.Replace("\\", "\\\\")));
+        }
+
         protected void cdb_OnCdbOuput(object sender, CdbEventArgs e)
         {
             if (OnCdbOuput != null)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.