Debugger: Added address range option for breakpoints
This commit is contained in:
parent
dd2d0697a0
commit
63d1cac802
8 changed files with 219 additions and 43 deletions
|
@ -12,7 +12,20 @@ Breakpoint::~Breakpoint()
|
|||
|
||||
bool Breakpoint::Matches(uint32_t memoryAddr, uint32_t absoluteAddr)
|
||||
{
|
||||
return _addr == -1 || ((int32_t)memoryAddr == _addr && !_isAbsoluteAddr) || ((int32_t)absoluteAddr == _addr && _isAbsoluteAddr);
|
||||
if(_endAddr == -1) {
|
||||
return _startAddr == -1 || ((int32_t)memoryAddr == _startAddr && !_isAbsoluteAddr) || ((int32_t)absoluteAddr == _startAddr && _isAbsoluteAddr);
|
||||
} else {
|
||||
if(_isAbsoluteAddr) {
|
||||
if((int32_t)absoluteAddr >= _startAddr && (int32_t)absoluteAddr <= _endAddr) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if((int32_t)memoryAddr >= _startAddr && (int32_t)memoryAddr <= _endAddr) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool Breakpoint::HasBreakpointType(BreakpointType type)
|
||||
|
|
|
@ -36,7 +36,8 @@ public:
|
|||
|
||||
private:
|
||||
BreakpointTypeFlags _type;
|
||||
int32_t _addr;
|
||||
int32_t _startAddr;
|
||||
int32_t _endAddr;
|
||||
bool _isAbsoluteAddr;
|
||||
char _condition[1000];
|
||||
};
|
|
@ -7,9 +7,14 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Mesen.GUI.Debugger
|
||||
{
|
||||
public enum BreakpointAddressType
|
||||
{
|
||||
AnyAddress,
|
||||
SingleAddress,
|
||||
AddressRange,
|
||||
}
|
||||
public class Breakpoint
|
||||
{
|
||||
|
||||
public bool BreakOnRead = false;
|
||||
public bool BreakOnWrite = false;
|
||||
public bool BreakOnReadVram = false;
|
||||
|
@ -18,10 +23,33 @@ namespace Mesen.GUI.Debugger
|
|||
|
||||
public bool Enabled = true;
|
||||
public UInt32 Address;
|
||||
public bool SpecificAddress = true;
|
||||
public UInt32 StartAddress;
|
||||
public UInt32 EndAddress;
|
||||
public BreakpointAddressType AddressType = BreakpointAddressType.SingleAddress;
|
||||
public bool IsAbsoluteAddress = false;
|
||||
public string Condition = "";
|
||||
|
||||
public string GetAddressString()
|
||||
{
|
||||
switch(AddressType) {
|
||||
case BreakpointAddressType.AnyAddress: return "<any>";
|
||||
case BreakpointAddressType.SingleAddress:
|
||||
if(IsAbsoluteAddress) {
|
||||
return "[$" + Address.ToString("X4") + "]";
|
||||
} else {
|
||||
return "$" + Address.ToString("X4");
|
||||
}
|
||||
|
||||
case BreakpointAddressType.AddressRange:
|
||||
if(IsAbsoluteAddress) {
|
||||
return $"[${StartAddress.ToString("X4")} - [${EndAddress.ToString("X4")}]";
|
||||
} else {
|
||||
return $"${StartAddress.ToString("X4")} - ${EndAddress.ToString("X4")}";
|
||||
}
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public void SetEnabled(bool enabled)
|
||||
{
|
||||
Enabled = enabled;
|
||||
|
@ -54,7 +82,27 @@ namespace Mesen.GUI.Debugger
|
|||
|
||||
public InteropBreakpoint ToInteropBreakpoint()
|
||||
{
|
||||
InteropBreakpoint bp = new InteropBreakpoint() { Address = SpecificAddress ? (Int32)Address : -1, Type = Type, IsAbsoluteAddress = IsAbsoluteAddress };
|
||||
InteropBreakpoint bp = new InteropBreakpoint() {
|
||||
Type = Type,
|
||||
IsAbsoluteAddress = IsAbsoluteAddress
|
||||
};
|
||||
switch(AddressType) {
|
||||
case BreakpointAddressType.AnyAddress:
|
||||
bp.StartAddress = -1;
|
||||
bp.EndAddress = -1;
|
||||
break;
|
||||
|
||||
case BreakpointAddressType.SingleAddress:
|
||||
bp.StartAddress = (Int32)Address;
|
||||
bp.EndAddress = -1;
|
||||
break;
|
||||
|
||||
case BreakpointAddressType.AddressRange:
|
||||
bp.StartAddress = (Int32)StartAddress;
|
||||
bp.EndAddress = (Int32)EndAddress;
|
||||
break;
|
||||
}
|
||||
|
||||
bp.Condition = new byte[1000];
|
||||
byte[] condition = Encoding.UTF8.GetBytes(Condition);
|
||||
Array.Copy(condition, bp.Condition, condition.Length);
|
||||
|
|
|
@ -49,14 +49,14 @@
|
|||
this.mnuRemoveBreakpoint,
|
||||
this.mnuGoToLocation});
|
||||
this.contextMenuBreakpoints.Name = "contextMenuWatch";
|
||||
this.contextMenuBreakpoints.Size = new System.Drawing.Size(153, 92);
|
||||
this.contextMenuBreakpoints.Size = new System.Drawing.Size(150, 70);
|
||||
this.contextMenuBreakpoints.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuBreakpoints_Opening);
|
||||
//
|
||||
// mnuAddBreakpoint
|
||||
//
|
||||
this.mnuAddBreakpoint.Name = "mnuAddBreakpoint";
|
||||
this.mnuAddBreakpoint.ShortcutKeys = System.Windows.Forms.Keys.Insert;
|
||||
this.mnuAddBreakpoint.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuAddBreakpoint.Size = new System.Drawing.Size(149, 22);
|
||||
this.mnuAddBreakpoint.Text = "Add...";
|
||||
this.mnuAddBreakpoint.Click += new System.EventHandler(this.mnuAddBreakpoint_Click);
|
||||
//
|
||||
|
@ -64,14 +64,14 @@
|
|||
//
|
||||
this.mnuRemoveBreakpoint.Name = "mnuRemoveBreakpoint";
|
||||
this.mnuRemoveBreakpoint.ShortcutKeys = System.Windows.Forms.Keys.Delete;
|
||||
this.mnuRemoveBreakpoint.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuRemoveBreakpoint.Size = new System.Drawing.Size(149, 22);
|
||||
this.mnuRemoveBreakpoint.Text = "Remove";
|
||||
this.mnuRemoveBreakpoint.Click += new System.EventHandler(this.mnuRemoveBreakpoint_Click);
|
||||
//
|
||||
// mnuGoToLocation
|
||||
//
|
||||
this.mnuGoToLocation.Name = "mnuGoToLocation";
|
||||
this.mnuGoToLocation.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuGoToLocation.Size = new System.Drawing.Size(149, 22);
|
||||
this.mnuGoToLocation.Text = "Go to location";
|
||||
this.mnuGoToLocation.Click += new System.EventHandler(this.mnuGoToLocation_Click);
|
||||
//
|
||||
|
@ -112,16 +112,17 @@
|
|||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Address";
|
||||
this.columnHeader2.Width = 70;
|
||||
this.columnHeader2.Width = 108;
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
this.columnHeader4.Text = "Condition";
|
||||
this.columnHeader4.Width = 100;
|
||||
this.columnHeader4.Width = 142;
|
||||
//
|
||||
// colLastColumn
|
||||
//
|
||||
this.colLastColumn.Text = "";
|
||||
this.colLastColumn.Width = 29;
|
||||
//
|
||||
// ctrlBreakpoints
|
||||
//
|
||||
|
|
|
@ -39,16 +39,11 @@ namespace Mesen.GUI.Debugger.Controls
|
|||
lstBreakpoints.BeginUpdate();
|
||||
lstBreakpoints.Items.Clear();
|
||||
foreach(Breakpoint breakpoint in BreakpointManager.Breakpoints) {
|
||||
string address = "$" + breakpoint.Address.ToString("X");
|
||||
if(breakpoint.IsAbsoluteAddress) {
|
||||
address = "[" + address + "]";
|
||||
}
|
||||
|
||||
ListViewItem item = new ListViewItem();
|
||||
item.Tag = breakpoint;
|
||||
item.Checked = breakpoint.Enabled;
|
||||
item.SubItems.Add(breakpoint.Type.ToString());
|
||||
item.SubItems.Add(breakpoint.SpecificAddress ? address : "<any>");
|
||||
item.SubItems.Add(breakpoint.GetAddressString());
|
||||
item.SubItems.Add(breakpoint.Condition);
|
||||
lstBreakpoints.Items.Add(item);
|
||||
}
|
||||
|
|
133
GUI.NET/Debugger/frmBreakpoint.Designer.cs
generated
133
GUI.NET/Debugger/frmBreakpoint.Designer.cs
generated
|
@ -42,6 +42,12 @@
|
|||
this.radSpecificAddress = new System.Windows.Forms.RadioButton();
|
||||
this.radAnyAddress = new System.Windows.Forms.RadioButton();
|
||||
this.lblAddressSign = new System.Windows.Forms.Label();
|
||||
this.radRange = new System.Windows.Forms.RadioButton();
|
||||
this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.lblFrom = new System.Windows.Forms.Label();
|
||||
this.txtFrom = new System.Windows.Forms.TextBox();
|
||||
this.lblTo = new System.Windows.Forms.Label();
|
||||
this.txtTo = new System.Windows.Forms.TextBox();
|
||||
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.chkReadVram = new System.Windows.Forms.CheckBox();
|
||||
|
@ -57,6 +63,7 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.picHelp)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picExpressionWarning)).BeginInit();
|
||||
this.tableLayoutPanel3.SuspendLayout();
|
||||
this.flowLayoutPanel4.SuspendLayout();
|
||||
this.tableLayoutPanel4.SuspendLayout();
|
||||
this.flowLayoutPanel3.SuspendLayout();
|
||||
this.flowLayoutPanel2.SuspendLayout();
|
||||
|
@ -64,8 +71,8 @@
|
|||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 151);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(378, 29);
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 171);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(493, 29);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
|
@ -89,7 +96,7 @@
|
|||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(378, 180);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(493, 200);
|
||||
this.tableLayoutPanel1.TabIndex = 2;
|
||||
//
|
||||
// lblBreakOn
|
||||
|
@ -116,7 +123,7 @@
|
|||
//
|
||||
this.chkEnabled.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.chkEnabled, 2);
|
||||
this.chkEnabled.Location = new System.Drawing.Point(3, 123);
|
||||
this.chkEnabled.Location = new System.Drawing.Point(3, 150);
|
||||
this.chkEnabled.Name = "chkEnabled";
|
||||
this.chkEnabled.Size = new System.Drawing.Size(65, 17);
|
||||
this.chkEnabled.TabIndex = 2;
|
||||
|
@ -127,7 +134,7 @@
|
|||
//
|
||||
this.lblCondition.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblCondition.AutoSize = true;
|
||||
this.lblCondition.Location = new System.Drawing.Point(3, 100);
|
||||
this.lblCondition.Location = new System.Drawing.Point(3, 127);
|
||||
this.lblCondition.Name = "lblCondition";
|
||||
this.lblCondition.Size = new System.Drawing.Size(54, 13);
|
||||
this.lblCondition.TabIndex = 7;
|
||||
|
@ -144,18 +151,18 @@
|
|||
this.tableLayoutPanel2.Controls.Add(this.txtCondition, 0, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.picExpressionWarning, 1, 0);
|
||||
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(60, 94);
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(60, 121);
|
||||
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 1;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(318, 26);
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(433, 26);
|
||||
this.tableLayoutPanel2.TabIndex = 10;
|
||||
//
|
||||
// picHelp
|
||||
//
|
||||
this.picHelp.Image = global::Mesen.GUI.Properties.Resources.Help;
|
||||
this.picHelp.Location = new System.Drawing.Point(297, 5);
|
||||
this.picHelp.Location = new System.Drawing.Point(412, 5);
|
||||
this.picHelp.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.picHelp.Name = "picHelp";
|
||||
this.picHelp.Size = new System.Drawing.Size(18, 18);
|
||||
|
@ -168,13 +175,13 @@
|
|||
this.txtCondition.Location = new System.Drawing.Point(3, 3);
|
||||
this.txtCondition.MaxLength = 900;
|
||||
this.txtCondition.Name = "txtCondition";
|
||||
this.txtCondition.Size = new System.Drawing.Size(264, 20);
|
||||
this.txtCondition.Size = new System.Drawing.Size(379, 20);
|
||||
this.txtCondition.TabIndex = 6;
|
||||
//
|
||||
// picExpressionWarning
|
||||
//
|
||||
this.picExpressionWarning.Image = global::Mesen.GUI.Properties.Resources.Warning;
|
||||
this.picExpressionWarning.Location = new System.Drawing.Point(273, 5);
|
||||
this.picExpressionWarning.Location = new System.Drawing.Point(388, 5);
|
||||
this.picExpressionWarning.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.picExpressionWarning.Name = "picExpressionWarning";
|
||||
this.picExpressionWarning.Size = new System.Drawing.Size(18, 18);
|
||||
|
@ -192,16 +199,20 @@
|
|||
this.tableLayoutPanel3.Controls.Add(this.txtAddress, 2, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.chkAbsolute, 3, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.radSpecificAddress, 0, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.radAnyAddress, 0, 1);
|
||||
this.tableLayoutPanel3.Controls.Add(this.radAnyAddress, 0, 2);
|
||||
this.tableLayoutPanel3.Controls.Add(this.lblAddressSign, 1, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.radRange, 0, 1);
|
||||
this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel4, 1, 1);
|
||||
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel3.Location = new System.Drawing.Point(60, 46);
|
||||
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||
this.tableLayoutPanel3.RowCount = 2;
|
||||
this.tableLayoutPanel3.RowCount = 4;
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel3.Size = new System.Drawing.Size(318, 48);
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel3.Size = new System.Drawing.Size(433, 75);
|
||||
this.tableLayoutPanel3.TabIndex = 11;
|
||||
//
|
||||
// txtAddress
|
||||
|
@ -210,21 +221,22 @@
|
|||
this.txtAddress.Location = new System.Drawing.Point(85, 3);
|
||||
this.txtAddress.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.txtAddress.Name = "txtAddress";
|
||||
this.txtAddress.Size = new System.Drawing.Size(157, 20);
|
||||
this.txtAddress.Size = new System.Drawing.Size(189, 20);
|
||||
this.txtAddress.TabIndex = 5;
|
||||
this.txtAddress.Enter += new System.EventHandler(this.txtAddress_Enter);
|
||||
//
|
||||
// chkAbsolute
|
||||
//
|
||||
this.chkAbsolute.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.chkAbsolute.AutoSize = true;
|
||||
this.chkAbsolute.Location = new System.Drawing.Point(248, 5);
|
||||
this.chkAbsolute.Location = new System.Drawing.Point(280, 17);
|
||||
this.chkAbsolute.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.chkAbsolute.Name = "chkAbsolute";
|
||||
this.chkAbsolute.Size = new System.Drawing.Size(67, 17);
|
||||
this.tableLayoutPanel3.SetRowSpan(this.chkAbsolute, 2);
|
||||
this.chkAbsolute.Size = new System.Drawing.Size(150, 17);
|
||||
this.chkAbsolute.TabIndex = 6;
|
||||
this.chkAbsolute.Text = "Absolute";
|
||||
this.chkAbsolute.Text = "Use PRG ROM addresses";
|
||||
this.chkAbsolute.UseVisualStyleBackColor = true;
|
||||
this.chkAbsolute.Enter += new System.EventHandler(this.txtAddress_Enter);
|
||||
//
|
||||
// radSpecificAddress
|
||||
//
|
||||
|
@ -242,7 +254,7 @@
|
|||
//
|
||||
this.radAnyAddress.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.radAnyAddress.AutoSize = true;
|
||||
this.radAnyAddress.Location = new System.Drawing.Point(3, 29);
|
||||
this.radAnyAddress.Location = new System.Drawing.Point(3, 53);
|
||||
this.radAnyAddress.Name = "radAnyAddress";
|
||||
this.radAnyAddress.Size = new System.Drawing.Size(43, 17);
|
||||
this.radAnyAddress.TabIndex = 8;
|
||||
|
@ -261,6 +273,73 @@
|
|||
this.lblAddressSign.TabIndex = 9;
|
||||
this.lblAddressSign.Text = "$";
|
||||
//
|
||||
// radRange
|
||||
//
|
||||
this.radRange.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.radRange.AutoSize = true;
|
||||
this.radRange.Location = new System.Drawing.Point(3, 29);
|
||||
this.radRange.Name = "radRange";
|
||||
this.radRange.Size = new System.Drawing.Size(60, 17);
|
||||
this.radRange.TabIndex = 10;
|
||||
this.radRange.TabStop = true;
|
||||
this.radRange.Text = "Range:";
|
||||
this.radRange.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// flowLayoutPanel4
|
||||
//
|
||||
this.tableLayoutPanel3.SetColumnSpan(this.flowLayoutPanel4, 2);
|
||||
this.flowLayoutPanel4.Controls.Add(this.lblFrom);
|
||||
this.flowLayoutPanel4.Controls.Add(this.txtFrom);
|
||||
this.flowLayoutPanel4.Controls.Add(this.lblTo);
|
||||
this.flowLayoutPanel4.Controls.Add(this.txtTo);
|
||||
this.flowLayoutPanel4.Location = new System.Drawing.Point(72, 26);
|
||||
this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel4.Name = "flowLayoutPanel4";
|
||||
this.flowLayoutPanel4.Size = new System.Drawing.Size(205, 24);
|
||||
this.flowLayoutPanel4.TabIndex = 11;
|
||||
//
|
||||
// lblFrom
|
||||
//
|
||||
this.lblFrom.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblFrom.AutoSize = true;
|
||||
this.lblFrom.Location = new System.Drawing.Point(0, 6);
|
||||
this.lblFrom.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.lblFrom.Name = "lblFrom";
|
||||
this.lblFrom.Size = new System.Drawing.Size(39, 13);
|
||||
this.lblFrom.TabIndex = 10;
|
||||
this.lblFrom.Text = "From $";
|
||||
//
|
||||
// txtFrom
|
||||
//
|
||||
this.txtFrom.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.txtFrom.Location = new System.Drawing.Point(39, 3);
|
||||
this.txtFrom.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.txtFrom.Name = "txtFrom";
|
||||
this.txtFrom.Size = new System.Drawing.Size(67, 20);
|
||||
this.txtFrom.TabIndex = 12;
|
||||
this.txtFrom.Enter += new System.EventHandler(this.txtFrom_Enter);
|
||||
//
|
||||
// lblTo
|
||||
//
|
||||
this.lblTo.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblTo.AutoSize = true;
|
||||
this.lblTo.Location = new System.Drawing.Point(109, 6);
|
||||
this.lblTo.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.lblTo.Name = "lblTo";
|
||||
this.lblTo.Size = new System.Drawing.Size(25, 13);
|
||||
this.lblTo.TabIndex = 11;
|
||||
this.lblTo.Text = "to $";
|
||||
//
|
||||
// txtTo
|
||||
//
|
||||
this.txtTo.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.txtTo.Location = new System.Drawing.Point(134, 3);
|
||||
this.txtTo.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.txtTo.Name = "txtTo";
|
||||
this.txtTo.Size = new System.Drawing.Size(68, 20);
|
||||
this.txtTo.TabIndex = 13;
|
||||
this.txtTo.Enter += new System.EventHandler(this.txtTo_Enter);
|
||||
//
|
||||
// tableLayoutPanel4
|
||||
//
|
||||
this.tableLayoutPanel4.ColumnCount = 2;
|
||||
|
@ -277,7 +356,7 @@
|
|||
this.tableLayoutPanel4.RowCount = 2;
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel4.Size = new System.Drawing.Size(318, 46);
|
||||
this.tableLayoutPanel4.Size = new System.Drawing.Size(433, 46);
|
||||
this.tableLayoutPanel4.TabIndex = 12;
|
||||
//
|
||||
// flowLayoutPanel3
|
||||
|
@ -288,7 +367,7 @@
|
|||
this.flowLayoutPanel3.Location = new System.Drawing.Point(56, 23);
|
||||
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
|
||||
this.flowLayoutPanel3.Size = new System.Drawing.Size(262, 23);
|
||||
this.flowLayoutPanel3.Size = new System.Drawing.Size(377, 23);
|
||||
this.flowLayoutPanel3.TabIndex = 5;
|
||||
//
|
||||
// chkReadVram
|
||||
|
@ -346,7 +425,7 @@
|
|||
this.flowLayoutPanel2.Location = new System.Drawing.Point(56, 0);
|
||||
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(262, 23);
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(377, 23);
|
||||
this.flowLayoutPanel2.TabIndex = 4;
|
||||
//
|
||||
// chkRead
|
||||
|
@ -386,7 +465,7 @@
|
|||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(378, 180);
|
||||
this.ClientSize = new System.Drawing.Size(493, 200);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "frmBreakpoint";
|
||||
|
@ -402,6 +481,8 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.picExpressionWarning)).EndInit();
|
||||
this.tableLayoutPanel3.ResumeLayout(false);
|
||||
this.tableLayoutPanel3.PerformLayout();
|
||||
this.flowLayoutPanel4.ResumeLayout(false);
|
||||
this.flowLayoutPanel4.PerformLayout();
|
||||
this.tableLayoutPanel4.ResumeLayout(false);
|
||||
this.tableLayoutPanel4.PerformLayout();
|
||||
this.flowLayoutPanel3.ResumeLayout(false);
|
||||
|
@ -439,5 +520,11 @@
|
|||
private System.Windows.Forms.RadioButton radPpu;
|
||||
private System.Windows.Forms.Label lblAddressSign;
|
||||
private System.Windows.Forms.PictureBox picExpressionWarning;
|
||||
private System.Windows.Forms.RadioButton radRange;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4;
|
||||
private System.Windows.Forms.Label lblFrom;
|
||||
private System.Windows.Forms.TextBox txtFrom;
|
||||
private System.Windows.Forms.Label lblTo;
|
||||
private System.Windows.Forms.TextBox txtTo;
|
||||
}
|
||||
}
|
|
@ -25,10 +25,17 @@ namespace Mesen.GUI.Debugger
|
|||
radCpu.Checked = true;
|
||||
}
|
||||
|
||||
AddBinding("SpecificAddress", radSpecificAddress, radAnyAddress);
|
||||
switch(breakpoint.AddressType) {
|
||||
case BreakpointAddressType.AnyAddress: radAnyAddress.Checked = true; break;
|
||||
case BreakpointAddressType.SingleAddress: radSpecificAddress.Checked = true; break;
|
||||
case BreakpointAddressType.AddressRange: radRange.Checked = true; break;
|
||||
}
|
||||
|
||||
AddBinding("Enabled", chkEnabled);
|
||||
AddBinding("IsAbsoluteAddress", chkAbsolute);
|
||||
AddBinding("Address", txtAddress);
|
||||
AddBinding("StartAddress", txtFrom);
|
||||
AddBinding("EndAddress", txtTo);
|
||||
AddBinding("BreakOnRead", chkRead);
|
||||
AddBinding("BreakOnWrite", chkWrite);
|
||||
AddBinding("BreakOnExec", chkExec);
|
||||
|
@ -61,6 +68,19 @@ namespace Mesen.GUI.Debugger
|
|||
);
|
||||
}
|
||||
|
||||
protected override void UpdateConfig()
|
||||
{
|
||||
base.UpdateConfig();
|
||||
|
||||
if(radAnyAddress.Checked) {
|
||||
((Breakpoint)Entity).AddressType = BreakpointAddressType.AnyAddress;
|
||||
} else if(radSpecificAddress.Checked) {
|
||||
((Breakpoint)Entity).AddressType = BreakpointAddressType.SingleAddress;
|
||||
} else if(radRange.Checked) {
|
||||
((Breakpoint)Entity).AddressType = BreakpointAddressType.AddressRange;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool ValidateInput()
|
||||
{
|
||||
if(txtCondition.Text.Length > 0) {
|
||||
|
@ -107,5 +127,15 @@ namespace Mesen.GUI.Debugger
|
|||
chkExec.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void txtFrom_Enter(object sender, EventArgs e)
|
||||
{
|
||||
radRange.Checked = true;
|
||||
}
|
||||
|
||||
private void txtTo_Enter(object sender, EventArgs e)
|
||||
{
|
||||
radRange.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -902,8 +902,9 @@ namespace Mesen.GUI
|
|||
public struct InteropBreakpoint
|
||||
{
|
||||
public BreakpointType Type;
|
||||
public Int32 Address;
|
||||
|
||||
public Int32 StartAddress;
|
||||
public Int32 EndAddress;
|
||||
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool IsAbsoluteAddress;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue