コード例 #1
0
        private void CommandSetBreakpoint_OnExecute(object obj)
        {
            if (!CommandSetBreakpoint_OnCanExecute(obj))
            {
                return;
            }
            var addr = (ushort)Convert.ToInt32(obj);
            var item = Target.GetBreakpointList()
                       .FirstOrDefault(arg => arg.Address.HasValue && arg.Address == addr);

            if (item != null)
            {
                Target.RemoveBreakpoint(item);
            }
            else
            {
                Target.AddBreakpoint(new Breakpoint(addr));
            }
            Target.RaiseUpdateState();
        }