コード例 #1
0
        public void generateMemregions()
        {
            String layout = textBox_memlayout.Text;
            Regex  regex  = new Regex("\r\n");

            String[] lines = regex.Split(layout);

            memregions.Clear();
            comboBox_memregions.Items.Clear();

            foreach (String mem in lines)
            {
                String[] mem_parts = mem.Split(' ');
                if (mem_parts.Length == 6)
                {
                    if (
                        mem_parts[1] == "-" &&
                        mem_parts[3] == "," &&
                        mem_parts[4] == "size:"
                        )
                    {
                        Memregion memregion = new Memregion(mem);
                        memregions.Add(memregion);
                        int start  = memregion.start;
                        int end    = memregion.end;
                        int length = memregion.length;
                        comboBox_memregions.Items.Add(String.Format("{0:X} -> {1:X} [{2:X}]", start, end, length));
                    }
                }
            }

            comboBox_memregions.SelectedIndex = 0;
        }
コード例 #2
0
        private void button_dump_Click(object sender, EventArgs e)
        {
            String    filename = textBox_dump_file.Text;
            Memregion mem      = memregions[comboBox_memregions.SelectedIndex];

            runCmd(String.Format("data(0x{0:X}, 0x{1:X}, filename='{2}', pid=0x{3:X})", mem.start, mem.length, filename, getPID()));
        }
コード例 #3
0
        private void button_dump_all_Click2(object sender, EventArgs e)
        {
            String    filename = textBox_dump_file.Text;
            Memregion mem      = memregions[memregions.Count - 1];

            runCmd(String.Format("data(0x{0:X}, 0x{1:X}, filename='{2}', pid=0x{3:X})", 0, mem.start + mem.length, filename, getPID()));
        }