コード例 #1
0
        private static DebugThreadInfo readDebugThreadInfo(BinaryReader rdr)
        {
            var info = new DebugThreadInfo();

            info.name = readString(rdr);
            info.id   = rdr.ReadUInt32();

            info.curCoreId = rdr.ReadInt32();
            info.attribs   = rdr.ReadUInt32();
            info.state     = rdr.ReadUInt32();

            info.entryPoint = rdr.ReadUInt32();
            info.stackStart = rdr.ReadUInt32();
            info.stackEnd   = rdr.ReadUInt32();

            info.cia = rdr.ReadUInt32();

            info.gpr = new uint[32];
            for (int i = 0; i < 32; ++i)
            {
                info.gpr[i] = rdr.ReadUInt32();
            }
            info.lr  = rdr.ReadUInt32();
            info.ctr = rdr.ReadUInt32();
            info.crf = rdr.ReadUInt32();

            return(info);
        }
コード例 #2
0
        public DebugThreadInfo Clone()
        {
            DebugThreadInfo n = new DebugThreadInfo();

            n.name = name;
            n.id   = id;

            n.curCoreId = curCoreId;
            n.attribs   = attribs;
            n.state     = state;

            n.entryPoint = entryPoint;
            n.stackStart = stackStart;
            n.stackEnd   = stackEnd;

            n.cia = cia;
            n.gpr = new uint[32];
            for (var i = 0; i < 32; ++i)
            {
                n.gpr[i] = gpr[i];
            }
            n.lr  = lr;
            n.ctr = ctr;
            n.crf = crf;

            return(n);
        }
コード例 #3
0
 public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
 {
     listBox.Items.Clear();
     if (pauseInfo != null)
     {
         var info = pauseInfo.modules;
         for (int i = 0; i < info.Length; ++i)
         {
             string lineText = String.Format("{0}  EP@{1:X8}",
                                             info[i].name,
                                             info[i].entryPoint);
             listBox.Items.Add(lineText);
         }
     }
 }
コード例 #4
0
        private void UpdatePauseInfo(DebugPauseInfo pauseInfo, uint activeCore = 1)
        {
            PauseInfo = pauseInfo;
            if (pauseInfo != null)
            {
                ActiveThread = getActiveThread(pauseInfo.threads, activeCore);
            }
            else
            {
                ActiveThread = null;
            }

            UpdatePauseInfo();
            asmView.Focus();
        }
コード例 #5
0
        public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
        {
            stackDisp.DebugManager.UpdateData(pauseInfo, activeThread);

            if (activeThread != null)
            {
                uint stackCurrent = activeThread.gpr[1];
                stackDisp.DataView      = stackDisp.DebugManager.CreateMemoryView(activeThread.stackEnd - 4, activeThread.stackStart);
                stackDisp.ActiveAddress = stackCurrent;
                stackDisp.JumpToAddress(stackCurrent);
            }
            else
            {
                stackDisp.DataView = null;
            }
        }
コード例 #6
0
        public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
        {
            memDisp.DebugManager.UpdateData(pauseInfo, activeThread);

            if (activeThread != null)
            {
                uint stackCurrent = activeThread.gpr[1];
                memDisp.DataView      = memDisp.DebugManager.CreateMemoryView(0x00000000, 0x100000000);
                memDisp.ActiveAddress = stackCurrent;
                memDisp.JumpToAddress(stackCurrent);
            }
            else
            {
                memDisp.DataView = null;
            }
        }
コード例 #7
0
        public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
        {
            listView.Items.Clear();

            if (pauseInfo != null)
            {
                var info = pauseInfo.threads;

                for (int i = 0; i < info.Length; ++i)
                {
                    ListViewItem item = new ListViewItem();

                    if (info[i] == activeThread)
                    {
                        item.Text = ">";
                    }
                    else
                    {
                        item.Text = "";
                    }

                    item.SubItems.Add(info[i].id.ToString());
                    item.SubItems.Add(info[i].name);
                    if (info[i].curCoreId >= 0)
                    {
                        item.SubItems.Add(info[i].curCoreId.ToString());
                    }
                    else
                    {
                        item.SubItems.Add("");
                    }
                    item.SubItems.Add(String.Format("{0:X8}", info[i].cia));
                    item.SubItems.Add(String.Format("{0:X8}", info[i].entryPoint));
                    item.SubItems.Add(String.Format("{0:X8}:{1:X8}",
                                                    info[i].stackStart,
                                                    info[i].stackEnd));
                    listView.Items.Add(item);
                }
            }
        }
コード例 #8
0
        public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
        {
            assemblyDisp.DebugManager.UpdateData(pauseInfo, activeThread);

            if (pauseInfo != null)
            {
                assemblyDisp.DataView = assemblyDisp.DebugManager.CreateMemoryView(0x00000000, 0x100000000);
                if (activeThread != null)
                {
                    assemblyDisp.ActiveAddress = activeThread.cia;
                }
                else
                {
                    assemblyDisp.ActiveAddress = pauseInfo.modules[pauseInfo.userModuleIdx].entryPoint;
                }
                assemblyDisp.JumpToAddress(assemblyDisp.ActiveAddress);
            }
            else
            {
                assemblyDisp.DataView = null;
            }
        }
コード例 #9
0
 public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
 {
     oldInfo = info;
     info    = activeThread;
     this.Invalidate();
 }
コード例 #10
0
 public void SetActiveThreadIdx(int threadIdx)
 {
     ActiveThread = PauseInfo.threads[threadIdx];
     UpdatePauseInfo();
 }
コード例 #11
0
 public void UpdateData(DebugPauseInfo pauseInfo, DebugThreadInfo activeThread)
 {
     _pauseInfo = pauseInfo;
 }