Ejemplo n.º 1
0
        // Remove whatever breakpoint is selected in the breakpoints GUI.
        public static void DbgDeleteSelectedBreak()
        {
            DebuggerBreakPoints DebuggerBreakPoints = "DebuggerBreakPoints";

            int selectedBreak = DebuggerBreakPoints.getSelectedId();
            //TODO
            int rowNum = DebuggerBreakPoints.getRowNumById(selectedBreak);

            if (rowNum >= 0)
            {
                string breakText = DebuggerBreakPoints.getRowText(rowNum);
                string breakLine = omni.Util.getField(breakText, 0);
                string breakFile = omni.Util.getField(breakText, 1);
                DbgRemoveBreakPoint(breakFile, breakLine.AsUint());
            }
        }
Ejemplo n.º 2
0
        public static void DbgBreakConditionSet()
        {
            DebuggerBreakConditionDlg DebuggerBreakConditionDlg = "DebuggerBreakConditionDlg";
            DebuggerBreakPoints       DebuggerBreakPoints       = "DebuggerBreakPoints";
            GuiTextEditCtrl           BreakCondition            = "BreakCondition";
            GuiTextEditCtrl           BreakPassCount            = "BreakPassCount";
            GuiTextEditCtrl           BreakClear = "BreakClear";
            GuiCanvas Canvas = "Canvas";

            // Read the condition.
            string condition = BreakCondition.getValue();
            string passct    = BreakPassCount.getValue();
            string clear     = BreakClear.getValue();

            if (condition == "")
            {
                condition = "true";
            }
            if (passct == "")
            {
                passct = "0";
            }
            if (clear == "")
            {
                clear = "false";
            }

            // Set the condition.
            int id = DebuggerBreakPoints.getSelectedId();

            if (id != -1)
            {
                string bkp = DebuggerBreakPoints.getRowTextById(id);
                DbgSetBreakPoint(omni.Util.getField(bkp, 1), omni.Util.getField(bkp, 0).AsUInt(), clear.AsBool(), passct,
                                 condition);
            }

            Canvas.popDialog(DebuggerBreakConditionDlg);
        }