Пример #1
0
        public void DebugStep()
        {
            if ((Core.MainForm.m_CurrentActiveTool != null) &&
                (!Core.MainForm.EmulatorSupportsDebugging(Core.MainForm.m_CurrentActiveTool)))
            {
                return;
            }
            if ((Core.MainForm.AppState == Types.StudioState.DEBUGGING_BROKEN) ||
                (Core.MainForm.AppState == Types.StudioState.DEBUGGING_RUN))
            {
                Core.MainForm.m_DebugMemory.InvalidateAllMemory();
                Debugger.StepInto();
                Debugger.RefreshRegistersAndWatches();
                Debugger.SetAutoRefreshMemory(Core.MainForm.m_DebugMemory.MemoryStart,
                                              Core.MainForm.m_DebugMemory.MemorySize,
                                              Core.MainForm.m_DebugMemory.MemoryAsCPU ? MemorySource.AS_CPU : MemorySource.RAM);
                Debugger.RefreshMemory(Core.MainForm.m_DebugMemory.MemoryStart,
                                       Core.MainForm.m_DebugMemory.MemorySize,
                                       Core.MainForm.m_DebugMemory.MemoryAsCPU ? MemorySource.AS_CPU : MemorySource.RAM);

                Core.Executing.BringStudioToForeground();

                if (Core.MainForm.AppState == Types.StudioState.DEBUGGING_RUN)
                {
                    FirstActionAfterBreak = true;
                }
                Core.MainForm.AppState = Types.StudioState.DEBUGGING_BROKEN;

                Core.MainForm.SetGUIForDebugging(true);
            }
        }