예제 #1
0
        private void RefreshData()
        {
            if (_formClosed)
            {
                return;
            }

            if (DebugWorkspaceManager.GetWorkspace() != this._previousWorkspace)
            {
                this.InitTblMappings();
                _previousWorkspace = DebugWorkspaceManager.GetWorkspace();
            }

            if (this.tabMain.SelectedTab == this.tpgAccessCounters)
            {
                this.ctrlMemoryAccessCounters.RefreshData();
            }
            else if (this.tabMain.SelectedTab == this.tpgMemoryViewer)
            {
                this.UpdateByteColorProvider();
                this.ctrlHexViewer.RefreshData(_memoryType);
            }
            else if (this.tabMain.SelectedTab == this.tpgProfiler)
            {
                this.ctrlProfiler.RefreshData();
            }
        }
예제 #2
0
 public static void Clear()
 {
     lock (_lock) {
         _workspace = null;
         _romName   = null;
     }
 }
예제 #3
0
 public static void Clear()
 {
     lock (_lock) {
         _workspace     = null;
         _romName       = null;
         SymbolProvider = null;
     }
 }
예제 #4
0
        private void UpdateWorkspace()
        {
            DebugWorkspaceManager.SaveWorkspace();
            DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace();

            ctrlLabelList.UpdateLabelList();
            ctrlFunctionList.UpdateFunctionList(true);
            ctrlBreakpoints.RefreshList();
        }
예제 #5
0
        private void InitTblMappings()
        {
            DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace();

            if (workspace.TblMappings != null && workspace.TblMappings.Count > 0)
            {
                var tblDict = TblLoader.ToDictionary(workspace.TblMappings.ToArray());
                if (tblDict != null)
                {
                    this.ctrlHexViewer.ByteCharConverter = new TblByteCharConverter(tblDict);
                }
            }
            else
            {
                this.ctrlHexViewer.ByteCharConverter = null;
            }
        }
예제 #6
0
        private void RefreshData()
        {
            if (DebugWorkspaceManager.GetWorkspace() != this._previousWorkspace)
            {
                this.InitTblMappings();
                _previousWorkspace = DebugWorkspaceManager.GetWorkspace();
            }

            if (this.tabMain.SelectedTab == this.tpgAccessCounters)
            {
                this.ctrlMemoryAccessCounters.RefreshData();
            }
            else if (this.tabMain.SelectedTab == this.tpgMemoryViewer)
            {
                this.UpdateByteColorProvider();
                this.ctrlHexViewer.SetData(InteropEmu.DebugGetMemoryState(this._memoryType));
            }
        }
예제 #7
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);
        }
예제 #8
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);
        }
예제 #9
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();
                        SetupWorkspace(false);
                    }
                }
            }
            return(_workspace);
        }
예제 #10
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);
        }