Basic debugger networking.
This commit is contained in:
14
src/Xenia.Debug.UI/MainWindow.Designer.cs
generated
14
src/Xenia.Debug.UI/MainWindow.Designer.cs
generated
@@ -29,7 +29,7 @@
|
||||
this.mainToolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.statusStrip = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusMessageLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.mainMenuStrip.SuspendLayout();
|
||||
this.mainToolStrip.SuspendLayout();
|
||||
this.statusStrip.SuspendLayout();
|
||||
@@ -72,18 +72,18 @@
|
||||
// statusStrip
|
||||
//
|
||||
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1});
|
||||
this.statusMessageLabel});
|
||||
this.statusStrip.Location = new System.Drawing.Point(0, 1081);
|
||||
this.statusStrip.Name = "statusStrip";
|
||||
this.statusStrip.Size = new System.Drawing.Size(1571, 22);
|
||||
this.statusStrip.TabIndex = 4;
|
||||
this.statusStrip.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
// statusMessageLabel
|
||||
//
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(118, 17);
|
||||
this.toolStripStatusLabel1.Text = "toolStripStatusLabel1";
|
||||
this.statusMessageLabel.Name = "statusMessageLabel";
|
||||
this.statusMessageLabel.Size = new System.Drawing.Size(118, 17);
|
||||
this.statusMessageLabel.Text = "";
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
@@ -115,7 +115,7 @@
|
||||
private System.Windows.Forms.ToolStrip mainToolStrip;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
private System.Windows.Forms.StatusStrip statusStrip;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel statusMessageLabel;
|
||||
private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using Xenia.Debug.UI.Views;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug.UI {
|
||||
public partial class MainWindow : Form {
|
||||
@@ -16,14 +17,14 @@ namespace Xenia.Debug.UI {
|
||||
|
||||
private BreakpointsPanel breakpointsPanel;
|
||||
private CallstackPanel callstackPanel;
|
||||
private List<CodeDocument> codeDocuments = new List<CodeDocument>();
|
||||
private readonly List<CodeDocument> codeDocuments = new List<CodeDocument>();
|
||||
private FilesystemPanel filesystemPanel;
|
||||
private FunctionsPanel functionsPanel;
|
||||
private HeapDocument heapDocument;
|
||||
private List<MemoryDocument> memoryDocuments = new List<MemoryDocument>();
|
||||
private readonly List<MemoryDocument> memoryDocuments = new List<MemoryDocument>();
|
||||
private ModulesPanel modulesPanel;
|
||||
private ProfilePanel profilePanel;
|
||||
private List<RegistersPanel> registersPanels = new List<RegistersPanel>();
|
||||
private readonly List<RegistersPanel> registersPanels = new List<RegistersPanel>();
|
||||
private StatisticsDocument statisticsDocument;
|
||||
private ThreadsPanel threadsPanel;
|
||||
private TracePanel tracePanel;
|
||||
@@ -44,7 +45,9 @@ namespace Xenia.Debug.UI {
|
||||
Controls.Add(dockPanel);
|
||||
Controls.SetChildIndex(dockPanel, 0);
|
||||
|
||||
this.Debugger = new Debugger();
|
||||
Debugger = new Debugger((AsyncTask task) => {
|
||||
BeginInvoke(task);
|
||||
});
|
||||
|
||||
breakpointsPanel = new BreakpointsPanel(Debugger);
|
||||
callstackPanel = new CallstackPanel(Debugger);
|
||||
@@ -66,6 +69,28 @@ namespace Xenia.Debug.UI {
|
||||
// new DeserializeDockContent(GetContentFromPersistString);
|
||||
|
||||
SetupDefaultLayout();
|
||||
|
||||
Debugger.StateChanged += Debugger_StateChanged;
|
||||
Debugger_StateChanged(this, Debugger.CurrentState);
|
||||
|
||||
Debugger.Attach();
|
||||
}
|
||||
|
||||
private void Debugger_StateChanged(object sender, Debugger.State e) {
|
||||
switch (e) {
|
||||
case Debugger.State.Idle:
|
||||
statusMessageLabel.Text = "Idle";
|
||||
break;
|
||||
case Debugger.State.Attaching:
|
||||
statusMessageLabel.Text = "Attaching";
|
||||
break;
|
||||
case Debugger.State.Attached:
|
||||
statusMessageLabel.Text = "Attached";
|
||||
break;
|
||||
case Debugger.State.Detached:
|
||||
statusMessageLabel.Text = "Detached";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupDefaultLayout() {
|
||||
|
||||
Reference in New Issue
Block a user