Пример #1
0
        public static void DbgRemoveBreakPoint(string file, uint line)
        {
            DebuggerFileView    DebuggerFileView    = "DebuggerFileView";
            DebuggerBreakPoints DebuggerBreakPoints = "DebuggerBreakPoints";
            TCPDebugger         TCPDebugger         = "TCPDebugger";

            if (file == omni.sGlobal["$DebuggerFile"])
            {
                DebuggerFileView.removeBreak(line);
            }
            TCPDebugger.send("BRKCLR " + file + " " + line + "\r\n");
            DebuggerBreakPoints.removeBreak(file, line.AsString());
        }
Пример #2
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());
            }
        }
Пример #3
0
        public static void DbgSetBreakPoint(string file, uint line, bool clear, string passct, string expr)
        {
            DebuggerFileView    DebuggerFileView    = "DebuggerFileView";
            DebuggerBreakPoints DebuggerBreakPoints = "DebuggerBreakPoints";
            TCPDebugger         TCPDebugger         = "TCPDebugger";

            if (!clear)
            {
                if (file == omni.sGlobal["$DebuggerFile"])
                {
                    DebuggerFileView.setBreak(line);
                }
            }
            DebuggerBreakPoints.addBreak(file, line.AsString(), clear, passct, expr);
            TCPDebugger.send("BRKSET " + file + " " + line + " " + clear + " " + passct + " " + expr + "\r\n");
        }
Пример #4
0
            public void handleBreakList(string line)
            {
                DebuggerFileView    DebuggerFileView    = "DebuggerFileView";
                DebuggerBreakPoints DebuggerBreakPoints = "DebuggerBreakPoints";

                string file = Util.getWord(line, 0);

                if (file != sGlobal["$DebuggerFile"])
                {
                    return;
                }
                int  pairs   = Util.getWord(line, 1).AsInt();
                uint curLine = 1;

                DebuggerFileView.clearBreakPositions();

                // Set the possible break positions.
                for (int i = 0; i < pairs; i++)
                {
                    uint skip   = Util.getWord(line, i * 2 + 2).AsUInt();
                    int  breaks = Util.getWord(line, i * 2 + 3).AsInt();
                    curLine += skip;
                    for (int j = 0; j < breaks; j++)
                    {
                        DebuggerFileView.setBreakPosition(curLine);
                        curLine++;
                    }
                }

                // Now set the actual break points.
                for (int i = 0; i < DebuggerBreakPoints.rowCount(); i++)
                {
                    string breakText = DebuggerBreakPoints.getRowText(i);
                    string breakLine = Util.getField(breakText, 0);
                    string breakFile = Util.getField(breakText, 1);
                    if (breakFile == sGlobal["$DebuggerFile"])
                    {
                        DebuggerFileView.setBreak(breakLine.AsUint());
                    }
                }
            }
Пример #5
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);
        }