Exemple #1
0
 public static void ResetLabels()
 {
     LabelManager.ResetLabels();
     if (!ConfigManager.Config.DebugInfo.DisableDefaultLabels)
     {
         LabelManager.SetDefaultLabels(InteropEmu.GetRomInfo().MapperId);
     }
     SaveWorkspace();
     GetWorkspace();
 }
Exemple #2
0
        public static DebugWorkspace GetWorkspace()
        {
            string romName = InteropEmu.GetRomInfo().GetRomName();

            if (_workspace == null || _romName != romName)
            {
                SymbolProvider = null;
                lock (_lock) {
                    if (_workspace == null || _romName != romName)
                    {
                        if (_workspace != null)
                        {
                            SaveWorkspace();
                        }
                        _romName   = InteropEmu.GetRomInfo().GetRomName();
                        _workspace = DebugWorkspace.GetWorkspace();

                        //Setup labels
                        if (_workspace.Labels.Count == 0)
                        {
                            LabelManager.ResetLabels();
                            if (!ConfigManager.Config.DebugInfo.DisableDefaultLabels)
                            {
                                LabelManager.SetDefaultLabels(InteropEmu.GetRomInfo().MapperId);
                            }
                        }
                        else
                        {
                            LabelManager.ResetLabels();
                            LabelManager.SetLabels(_workspace.Labels, true);
                        }

                        //Load watch entries
                        WatchManager.WatchEntries = _workspace.WatchValues;

                        //Load breakpoints
                        BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
                    }
                }
            }
            return(_workspace);
        }
Exemple #3
0
        public static DebugWorkspace GetWorkspace()
        {
            string romName = InteropEmu.GetRomInfo().GetRomName();

            if (_workspace == null || _romName != romName)
            {
                lock (_lock) {
                    if (_workspace == null || _romName != romName)
                    {
                        if (_workspace != null)
                        {
                            SaveWorkspace();
                        }
                        _romName   = InteropEmu.GetRomInfo().GetRomName();
                        _workspace = DebugWorkspace.GetWorkspace();

                        //Setup labels
                        if (_workspace.Labels.Count == 0)
                        {
                            LabelManager.ResetLabels();
                            if (!ConfigManager.Config.DebugInfo.DisableDefaultLabels)
                            {
                                LabelManager.SetDefaultLabels(InteropEmu.FdsGetSideCount() > 0);
                            }
                        }
                        else
                        {
                            LabelManager.ResetLabels();
                            LabelManager.SetLabels(_workspace.Labels, false);
                        }

                        //Load watch entries
                        WatchManager.WatchEntries = _workspace.WatchValues;

                        //Load breakpoints
                        BreakpointManager.Breakpoints.Clear();
                        BreakpointManager.Breakpoints.AddRange(_workspace.Breakpoints);
                    }
                }
            }
            return(_workspace);
        }
Exemple #4
0
        public static void SetupWorkspace(bool saveCurrentWorkspace = true)
        {
            string romName = InteropEmu.GetRomInfo().GetRomName();

            lock (_lock) {
                if (_workspace != null && _romName == romName)
                {
                    if (saveCurrentWorkspace)
                    {
                        SaveWorkspace();
                    }

                    //Setup labels
                    if (_workspace.Labels.Count == 0)
                    {
                        LabelManager.ResetLabels();
                        if (!ConfigManager.Config.DebugInfo.DisableDefaultLabels)
                        {
                            LabelManager.SetDefaultLabels(InteropEmu.FdsGetSideCount() > 0);
                        }
                    }
                    else
                    {
                        LabelManager.ResetLabels();
                        LabelManager.SetLabels(_workspace.Labels, false);
                    }

                    //Load watch entries
                    WatchManager.WatchEntries = _workspace.WatchValues;

                    //Load breakpoints
                    BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
                }
                else
                {
                    Clear();
                }
            }
        }
Exemple #5
0
        public static DebugWorkspace GetWorkspace()
        {
            string romName = InteropEmu.GetRomInfo().GetRomName();

            if (_workspace != null)
            {
                SaveWorkspace();
            }

            if (_workspace == null || _romName != romName)
            {
                SymbolProvider = null;
                lock (_lock) {
                    if (_workspace == null || _romName != romName)
                    {
                        _romName   = InteropEmu.GetRomInfo().GetRomName();
                        _workspace = DebugWorkspace.GetWorkspace();

                        //Load watch entries
                        WatchManager.WatchEntries = _workspace.WatchValues;

                        //Setup labels
                        if (_workspace.Labels.Count == 0 && !ConfigManager.Config.DebugInfo.DisableDefaultLabels)
                        {
                            LabelManager.SetDefaultLabels(InteropEmu.GetRomInfo().MapperId);
                        }
                    }
                }
            }

            //Send breakpoints & labels to emulation core (even if the same game is running)
            BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
            LabelManager.RefreshLabels();

            return(_workspace);
        }