Пример #1
0
        private void RenderSampleData(SortedDictionary <UInt32, Segment> segments)
        {
            listView1.Items.Clear();

            foreach (var segment in segments)
            {
                if (segment.Value.hits == 1)
                {
                    continue;
                }

                string       osTimeReply  = Jdi.CallJdi("OSTime 0x" + segment.Value.timeTotal.ToString("X16"));
                OSTimeResult osTimeResult = JsonConvert.DeserializeObject <OSTimeResult>(osTimeReply);

                string nearestNameReply = Jdi.CallJdi("GetNearestName 0x" + segment.Key.ToString("X8"));
                GetNearestNameResult nearestNameResult = JsonConvert.DeserializeObject <GetNearestNameResult>(nearestNameReply);

                string symbolicInfo = "";
                if (nearestNameResult.reply != null)
                {
                    symbolicInfo = " (" + nearestNameResult.reply.name + "+0x" + nearestNameResult.reply.offset.ToString("X") + ")";
                }

                ListViewItem item = new ListViewItem("0x" + segment.Key.ToString("X8") + symbolicInfo);
                item.SubItems.Add(osTimeResult.reply[0]);
                item.SubItems.Add(segment.Value.hits.ToString());
                listView1.Items.Add(item);
            }
        }
Пример #2
0
        private void addSymbolsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialogMap.ShowDialog() == DialogResult.OK)
            {
                Jdi.CallJdi("AddMap \"" + openFileDialogMap.FileName + "\"");

                RenderSampleData(sampleData.Analyze());
            }
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();

#if DEBUG
            AllocConsole();
#else
            debugToolStripMenuItem.Visible = false;
#endif

            Jdi.InitEmu();
        }
Пример #4
0
        private void checkVersionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string reply = Jdi.CallJdi("GetVersion");

            Console.WriteLine("Version: " + reply);
        }
Пример #5
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     Jdi.ShutdownEmu();
 }