Debugger - add Step Into/Over/Out menu items and buttons, not enabled yet, still need an API to wire up to
This commit is contained in:
parent
8648e6ba0a
commit
dd77eaf0c9
|
@ -32,6 +32,10 @@
|
|||
this.menuStrip1 = new MenuStripEx();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.DebugSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.StepIntoMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.StepOverMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.StepOutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AutoloadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -44,10 +48,13 @@
|
|||
this.BreakpointsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.BreakPointControl1 = new BizHawk.Client.EmuHawk.tools.Debugger.BreakpointControl();
|
||||
this.DisassemblerBox = new System.Windows.Forms.GroupBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.DisassemblerView = new BizHawk.Client.EmuHawk.VirtualListView();
|
||||
this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Instruction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.StepOutBtn = new System.Windows.Forms.Button();
|
||||
this.StepIntoBtn = new System.Windows.Forms.Button();
|
||||
this.StepOverBtn = new System.Windows.Forms.Button();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.RegistersGroupBox.SuspendLayout();
|
||||
this.BreakpointsGroupBox.SuspendLayout();
|
||||
|
@ -59,6 +66,7 @@
|
|||
this.menuStrip1.ClickThrough = true;
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.DebugSubMenu,
|
||||
this.OptionsSubMenu});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
|
@ -82,6 +90,44 @@
|
|||
this.ExitMenuItem.Text = "&Close";
|
||||
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
||||
//
|
||||
// DebugSubMenu
|
||||
//
|
||||
this.DebugSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.StepIntoMenuItem,
|
||||
this.StepOverMenuItem,
|
||||
this.StepOutMenuItem});
|
||||
this.DebugSubMenu.Name = "DebugSubMenu";
|
||||
this.DebugSubMenu.Size = new System.Drawing.Size(54, 20);
|
||||
this.DebugSubMenu.Text = "&Debug";
|
||||
this.DebugSubMenu.DropDownOpened += new System.EventHandler(this.DebugSubMenu_DropDownOpened);
|
||||
//
|
||||
// StepIntoMenuItem
|
||||
//
|
||||
this.StepIntoMenuItem.Enabled = false;
|
||||
this.StepIntoMenuItem.Name = "StepIntoMenuItem";
|
||||
this.StepIntoMenuItem.ShortcutKeyDisplayString = "F11";
|
||||
this.StepIntoMenuItem.Size = new System.Drawing.Size(177, 22);
|
||||
this.StepIntoMenuItem.Text = "Step &Into";
|
||||
this.StepIntoMenuItem.Click += new System.EventHandler(this.StepIntoMenuItem_Click);
|
||||
//
|
||||
// StepOverMenuItem
|
||||
//
|
||||
this.StepOverMenuItem.Enabled = false;
|
||||
this.StepOverMenuItem.Name = "StepOverMenuItem";
|
||||
this.StepOverMenuItem.ShortcutKeyDisplayString = "F10";
|
||||
this.StepOverMenuItem.Size = new System.Drawing.Size(177, 22);
|
||||
this.StepOverMenuItem.Text = "Step O&ver";
|
||||
this.StepOverMenuItem.Click += new System.EventHandler(this.StepOverMenuItem_Click);
|
||||
//
|
||||
// StepOutMenuItem
|
||||
//
|
||||
this.StepOutMenuItem.Enabled = false;
|
||||
this.StepOutMenuItem.Name = "StepOutMenuItem";
|
||||
this.StepOutMenuItem.ShortcutKeyDisplayString = "Shift+F11";
|
||||
this.StepOutMenuItem.Size = new System.Drawing.Size(177, 22);
|
||||
this.StepOutMenuItem.Text = "Step Ou&t";
|
||||
this.StepOutMenuItem.Click += new System.EventHandler(this.StepOutMenuItem_Click);
|
||||
//
|
||||
// OptionsSubMenu
|
||||
//
|
||||
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -199,6 +245,15 @@
|
|||
this.DisassemblerBox.TabStop = false;
|
||||
this.DisassemblerBox.Text = "Disassembler";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 23);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(29, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Cpu:";
|
||||
//
|
||||
// DisassemblerView
|
||||
//
|
||||
this.DisassemblerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
|
@ -230,20 +285,50 @@
|
|||
this.Instruction.Text = "Instruction";
|
||||
this.Instruction.Width = 143;
|
||||
//
|
||||
// label1
|
||||
// StepOutBtn
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 23);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(29, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Cpu:";
|
||||
this.StepOutBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.StepOutBtn.Enabled = false;
|
||||
this.StepOutBtn.Location = new System.Drawing.Point(680, 325);
|
||||
this.StepOutBtn.Name = "StepOutBtn";
|
||||
this.StepOutBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.StepOutBtn.TabIndex = 10;
|
||||
this.StepOutBtn.Text = "Step Out";
|
||||
this.StepOutBtn.UseVisualStyleBackColor = true;
|
||||
this.StepOutBtn.Click += new System.EventHandler(this.StepOutMenuItem_Click);
|
||||
//
|
||||
// StepIntoBtn
|
||||
//
|
||||
this.StepIntoBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.StepIntoBtn.Enabled = false;
|
||||
this.StepIntoBtn.Location = new System.Drawing.Point(680, 267);
|
||||
this.StepIntoBtn.Name = "StepIntoBtn";
|
||||
this.StepIntoBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.StepIntoBtn.TabIndex = 11;
|
||||
this.StepIntoBtn.Text = "Step Into";
|
||||
this.StepIntoBtn.UseVisualStyleBackColor = true;
|
||||
this.StepIntoBtn.Click += new System.EventHandler(this.StepIntoMenuItem_Click);
|
||||
//
|
||||
// StepOverBtn
|
||||
//
|
||||
this.StepOverBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.StepOverBtn.Enabled = false;
|
||||
this.StepOverBtn.Location = new System.Drawing.Point(680, 296);
|
||||
this.StepOverBtn.Name = "StepOverBtn";
|
||||
this.StepOverBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.StepOverBtn.TabIndex = 12;
|
||||
this.StepOverBtn.Text = "Step Over";
|
||||
this.StepOverBtn.UseVisualStyleBackColor = true;
|
||||
this.StepOverBtn.Click += new System.EventHandler(this.StepOverMenuItem_Click);
|
||||
//
|
||||
// GenericDebugger
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(767, 560);
|
||||
this.Controls.Add(this.StepOverBtn);
|
||||
this.Controls.Add(this.StepIntoBtn);
|
||||
this.Controls.Add(this.StepOutBtn);
|
||||
this.Controls.Add(this.BreakpointsGroupBox);
|
||||
this.Controls.Add(this.RegistersGroupBox);
|
||||
this.Controls.Add(this.DisassemblerBox);
|
||||
|
@ -286,5 +371,12 @@
|
|||
private System.Windows.Forms.ColumnHeader Address;
|
||||
private System.Windows.Forms.ColumnHeader Instruction;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button StepOutBtn;
|
||||
private System.Windows.Forms.Button StepIntoBtn;
|
||||
private System.Windows.Forms.Button StepOverBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem DebugSubMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem StepIntoMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem StepOverMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem StepOutMenuItem;
|
||||
}
|
||||
}
|
|
@ -235,11 +235,41 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Menu Items
|
||||
|
||||
#region File
|
||||
|
||||
private void ExitMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Debug
|
||||
|
||||
private void DebugSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StepIntoMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("TODO");
|
||||
}
|
||||
|
||||
private void StepOverMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("TODO");
|
||||
}
|
||||
|
||||
private void StepOutMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("TODO");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Options
|
||||
|
||||
private void OptionsSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
AutoloadMenuItem.Checked = Global.Config.GenericDebuggerAutoload;
|
||||
|
@ -278,5 +308,30 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
if (keyData == Keys.F10)
|
||||
{
|
||||
StepIntoMenuItem_Click(null, null);
|
||||
return true;
|
||||
}
|
||||
else if (keyData == (Keys.F11 | Keys.Shift))
|
||||
{
|
||||
StepOverMenuItem_Click(null, null);
|
||||
return true;
|
||||
}
|
||||
else if (keyData == Keys.F11)
|
||||
{
|
||||
StepOutMenuItem_Click(null, null);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue