public AddBreakpointDialog(BreakpointOperation op, uint address, uint mask, MemoryCallbackType type) : this(op) { AddressMaskBox.SetHexProperties(0xFFFFFFFF); Address = address; AddressMask = mask; BreakType = type; }
public void AddBreakpoint(uint address, uint mask, MemoryCallbackType type) { _breakpoints.Add(Core, MemoryDomains.SystemBus.Name, address, mask, type); BreakpointView.ItemCount = _breakpoints.Count; UpdateBreakpointRemoveButton(); UpdateStatsLabel(); }
public void AddBreakpoint(uint address, MemoryCallbackType type) { Breakpoints.Add(Core, address, type); BreakpointView.ItemCount = Breakpoints.Count; UpdateBreakpointRemoveButton(); UpdateStatsLabel(); }
public MemoryCallback(string scope, MemoryCallbackType type, string name, MemoryCallbackDelegate callback, uint?address, uint?mask) { Type = type; Name = name; Callback = callback; Address = address; AddressMask = mask ?? 0xFFFFFFFF; Scope = scope; }
public Breakpoint(IDebuggable core, Action callBack, uint address, MemoryCallbackType type, bool enabled = true) { _core = core; Type = type; Callback = callBack; Address = address; Name = "Pause"; Active = enabled; }
public Breakpoint(string name, bool readOnly, IDebuggable core, Action callBack, uint address, MemoryCallbackType type, bool enabled = true) { _core = core; Type = type; Callback = callBack; Address = address; Name = name; Active = enabled; ReadOnly = readOnly; }
public MemoryCallback(MemoryCallbackType type, string name, Action callback, uint? address) { if (type == MemoryCallbackType.Execute && !address.HasValue) { throw new InvalidOperationException("When assigning an execute callback, an address must be specified"); } Type = type; Name = name; Callback = callback; Address = address; }
public Breakpoint(IDebuggable core, string scope, MemoryCallbackDelegate callBack, uint address, uint mask, MemoryCallbackType type, bool enabled = true) { Scope = scope; _core = core; Type = type; Callback = callBack; Address = address; AddressMask = mask; Name = "Pause"; Active = enabled; }
public Breakpoint(bool readOnly, IDebuggable core, Action callBack, uint address, uint mask, MemoryCallbackType type, bool enabled = true) { _core = core; Type = type; Callback = callBack; Address = address; AddressMask = mask; Name = "Pause"; Active = enabled; ReadOnly = readOnly; }
public MemoryCallback(MemoryCallbackType type, string name, Action callback, uint?address) { if (type == MemoryCallbackType.Execute && !address.HasValue) { throw new InvalidOperationException("When assigning an execute callback, an address must be specified"); } Type = type; Name = name; Callback = callback; Address = address; }
private string SetMemoryEvent(MemoryCallbackType type, string callback, uint address, uint bytes, string name, uint?checkAddress = null, uint checkValue = 0, string domain = "System Bus") { domain = NormalizeDomain(domain); try { if (DebuggableCore?.MemoryCallbacksAvailable() == true && (type != MemoryCallbackType.Execute || DebuggableCore.MemoryCallbacks.ExecuteCallbacksAvailable)) { name = name ?? callback; uint mask = 0; for (var i = 0; i < bytes; i++) { mask |= (uint)(0xFF << (i * 8)); } if (!HasDomain(domain)) { throw new ApiError($"{Emulator.Attributes().CoreName} does not support memory callbacks on the domain {domain}"); } HttpClient client = new HttpClient(); DebuggableCore.MemoryCallbacks.Add(new MemoryCallback( domain, type, name, (uint address, uint value, uint flags) => { if (checkAddress != null && ReadUnsignedByte((int)checkAddress, domain) == checkValue) { try { client.GetAsync(callback).Result.ToString(); } catch { } } }, address, mask )); return(name); } // fall through } catch (NotImplementedException) { } if (type == MemoryCallbackType.Execute) { throw new ApiError($"{Emulator.Attributes().CoreName} does not support memory execute callbacks."); } throw new ApiError($"{Emulator.Attributes().CoreName} does not support memory callbacks."); }
public MemoryCallback(string scope, MemoryCallbackType type, string name, MemoryCallbackDelegate callback, uint?address, uint?mask) { if (type == MemoryCallbackType.Execute && !address.HasValue) { throw new InvalidOperationException("When assigning an execute callback, an address must be specified"); } Type = type; Name = name; Callback = callback; Address = address; AddressMask = mask ?? 0xFFFFFFFF; Scope = scope; }
private string SetMemoryEvent(MemoryCallbackType type, string callback, uint address, uint bytes, string name, int checkAddr = -1, uint checkValue = 0) { try { if ( DebuggableCore != null && DebuggableCore.MemoryCallbacksAvailable() && (type != MemoryCallbackType.Execute || DebuggableCore.MemoryCallbacks.ExecuteCallbacksAvailable) ) { name = name ?? callback; uint mask = 0; for (var i = 0; i < bytes; i++) { mask |= (uint)(0xFF << (i * 8)); } HttpClient client = new HttpClient(); DebuggableCore.MemoryCallbacks.Add(new MemoryCallback(type, name, () => { if (checkAddr < 0 || ReadUnsignedByte(checkAddr) == checkValue) { try { client.GetAsync(callback).Result.ToString(); } catch { } } }, address, mask)); return(name); } } catch (NotImplementedException) { } if (type == MemoryCallbackType.Execute) { throw new ApiError($"{Emulator.Attributes().CoreName} does not support memory execute callbacks."); } throw new ApiError($"{Emulator.Attributes().CoreName} does not support memory callbacks."); }
public AddBreakpointDialog(BreakpointOperation op, uint address, MemoryCallbackType type) : this(op) { Address = address; BreakType = type; }
public void AddBreakpoint(uint address, uint mask, MemoryCallbackType type) { this.BreakPointControl1.AddBreakpoint(address, mask, type); }
public AddBreakpointDialog(BreakpointOperation op, uint address, MemoryCallbackType type):this(op) { Address = address; BreakType = type; }
public Breakpoint(bool readOnly, IDebuggable core, Action callBack, uint address, MemoryCallbackType type, bool enabled = true) { _core = core; Callback = callBack; Address = address; Active = enabled; Name = "Pause"; ReadOnly = readOnly; if (enabled) { AddCallback(); } }
public void Add(IDebuggable core, uint address, MemoryCallbackType type) { Add(new Breakpoint(core, Callback, address, type)); }
private AddBreakpointDialog CreateAddBreakpointDialog(BreakpointOperation op, MemoryCallbackType? type = null, uint? address = null) { var operation = (AddBreakpointDialog.BreakpointOperation)op; var b = new AddBreakpointDialog(operation) { // TODO: don't use Global.Emulator! Pass in an IMemoryDomains implementation from the parent tool MaxAddressSize = Global.Emulator.AsMemoryDomains().SystemBus.Size - 1 }; if (type != null) { b.BreakType = (MemoryCallbackType)type; } if (address != null) { b.Address = (uint)address; } if (!MCS.ExecuteCallbacksAvailable) { b.DisableExecuteOption(); } return b; }
public void AddBreakpoint(uint address, MemoryCallbackType type) { this.BreakPointControl1.AddBreakpoint(address, type); }
private Func <IEnumerable <string>, string, string> WrapConditionalMemoryEvent(MemoryCallbackType type, Func <MemoryCallbackType, string, uint, uint, string, uint?, uint, string, string> innerCall) => (IEnumerable <string> args, string domain) => innerCall(type, string.Join("/", args.Skip(4)), (uint)GetAddr(args, CurrentDomain.Name), (uint)GetLength(args), domain, (uint)GetAddr(args, CurrentDomain.Name, 2), (uint)GetValue(args, 3), null);
// MemoryEvents private Func <IEnumerable <string>, string, string> WrapMemoryEvent(MemoryCallbackType type, Func <MemoryCallbackType, string, uint, uint, string, int, uint, string> innerCall) => (IEnumerable <string> args, string domain) => innerCall(type, string.Join("/", args.Skip(2)), (uint)GetAddr(args, CurrentDomain.Name), (uint)GetLength(args), domain, -1, 0);
public void Add(IDebuggable core, string scope, uint address, uint mask, MemoryCallbackType type) { Add(new Breakpoint(core, scope, Callback, address, mask, type)); }