mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
35 lines
1,003 B
C#
35 lines
1,003 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.GdbClient.BasicCommands
|
|
{
|
|
public class BreakpointCommand : CommandBase<object>
|
|
{
|
|
public uint Address { get; set; }
|
|
public bool Set { get; set; }
|
|
|
|
public BreakpointCommand(uint address, bool set)
|
|
: base(GdbController.Instance)
|
|
{
|
|
Address = address;
|
|
Set = set;
|
|
}
|
|
|
|
protected override void Execute()
|
|
{
|
|
Controller.AcknowledgementReceived += new EventHandler(Controller_AcknowledgementReceived);
|
|
|
|
string cmd = "B";
|
|
cmd += Address.ToString("x");
|
|
cmd += "," + (Set ? "S" : "C");
|
|
}
|
|
|
|
void Controller_AcknowledgementReceived(object sender, EventArgs e)
|
|
{
|
|
Controller.AcknowledgementReceived -= new EventHandler(Controller_AcknowledgementReceived);
|
|
Done(null);
|
|
}
|
|
}
|
|
}
|