/// <summary> /// Updates the watch item value according to the watch type. /// </summary> /// <param name="item">The watch item to update.</param> /// <param name="value">The value to set.</param> private static void UpdateItemValue(WatchPad.WatchItem item, long value) { if (item.Type == "Signed") { item.Value = ((short)value).ToString(); } else { item.Value = ((ushort)value).ToString(); } }
/// <summary> /// Edits the specified watch item and the corresponding memory location /// by storing the specified value. /// </summary> /// <param name="item">The watch to edit.</param> /// <param name="value">The value to store.</param> protected override void EditWatchValue(WatchPad.WatchItem item, long value) { if (Platform.DebuggerController.State != DebuggerController.States.Suspended) { return; } ushort address; if (!GetAddress(item.Name, out address)) { return; } Platform.DebuggerController.Debugger.Target.Memory[address] = value; UpdateItemValue(item, value); }
/// <summary> /// Updates the value of the specified watch item. /// </summary> /// <param name="item">The watch item to update.</param> protected override void UpdateWatchItem(WatchPad.WatchItem item) { if (Platform.DebuggerController.State == DebuggerController.States.Suspended) { ushort address; if (!GetAddress(item.Name, out address)) { item.Value = "?"; return; } long val = Platform.DebuggerController.Debugger.Target.Memory[address]; UpdateItemValue(item, val); } else { item.Value = "?"; } }