Beispiel #1
0
        void ProcessBreakEvent(BreakEvent evt, DebugState state, int activeAddress)
        {
            if (ConfigManager.Config.Debug.Debugger.BringToFrontOnBreak)
            {
                Breakpoint bp = BreakpointManager.GetBreakpointById(evt.BreakpointId);
                if (bp?.CpuType == _cpuType || evt.Source > BreakSource.PpuStep)
                {
                    DebugWindowManager.BringToFront(this);
                }
            }

            UpdateContinueAction();
            UpdateDebugger(state, activeAddress);

            if (evt.Source == BreakSource.Breakpoint || evt.Source > BreakSource.PpuStep)
            {
                string message = ResourceHelper.GetEnumText(evt.Source);
                if (evt.Source == BreakSource.Breakpoint)
                {
                    message += ": " + ResourceHelper.GetEnumText(evt.Operation.Type) + " ($" + evt.Operation.Address.ToString("X4") + ":$" + evt.Operation.Value.ToString("X2") + ")";
                }
                ctrlDisassemblyView.SetMessage(new TextboxMessageInfo()
                {
                    Message = message
                });
            }
        }