Example #1
0
        private void AttachToProcess(int rowIndex)
        {
            string processName = ProcessesListDataGridView.Rows[rowIndex].Cells[0].Value.ToString();
            int    pid         = Convert.ToInt32(ProcessesListDataGridView.Rows[rowIndex].Cells[1].Value);

            mainForm.SelectedProcess = processName;
            OrbisDbg.SetProcess(processName);
            mainForm.SetButtonsEnabled(true);

            if (!Convert.ToBoolean(ProcessesListDataGridView.Rows[rowIndex].Cells[2].Value))
            {
                ProcessesListDataGridView.Rows[rowIndex].Cells[2].Value = true;

                for (int i = 0; i < mainForm.pList.Count; i++)
                {
                    if (mainForm.pList[i].pid == pid)
                    {
                        mainForm.pList[i].attached = 1;
                        break;
                    }
                }

                OrbisDbg.AttachProcess();
            }
        }