示例#1
0
 private void SetBreakpoint()
 {
     if (SelectedInstruction != null)
     {
         ushort address = ushort.Parse(SelectedInstruction.Address.Remove(0, 2), NumberStyles.HexNumber);
         _cpu.AddBreakpoint(BreakpointKinds.EXECUTION, address);
         OnPropertyChanged(() => BreakPoint);
     }
 }
        public void ToggleBreakpoint()
        {
            List <ushort> execBreakpoints = _cpu.GetBreakpoints(BreakpointKinds.EXECUTION);

            if (execBreakpoints.Contains(originalAddress))
            {
                _cpu.RemoveBreakpoint(BreakpointKinds.EXECUTION, originalAddress);
                HasBreakpoint = false;
            }
            else
            {
                _cpu.AddBreakpoint(BreakpointKinds.EXECUTION, originalAddress);
                HasBreakpoint = true;
            }

            if (BreakpointChanged != null)
            {
                BreakpointChanged();
            }
        }