Пример #1
0
        public static void DbgConsoleEntryReturn()
        {
            DebuggerConsoleView DebuggerConsoleView = "DebuggerConsoleView";
            TCPDebugger         TCPDebugger         = "TCPDebugger";
            GuiTextEditCtrl     DbgConsoleEntry     = "DbgConsoleEntry";
            GuiTextCtrl         DebuggerStatus      = "DebuggerStatus";

            string msg = DbgConsoleEntry.getValue();

            if (msg != "")
            {
                DebuggerConsoleView.print("" + msg);
                if (DebuggerStatus.getValue() == "NOT CONNECTED")
                {
                    DebuggerConsoleView.print("*** Not connected.");
                }
                else if (DebuggerStatus.getValue() == "BREAK")
                {
                    DebuggerConsoleView.print("*** Target is in BREAK mode.");
                }
                else
                {
                    TCPDebugger.send("CEVAL " + msg + "\r\n");
                }
            }
            DbgConsoleEntry.setValue("");
        }
Пример #2
0
        public static void DbgWatchDialogEdit()
        {
            GuiTextEditCtrl      EditWatchDialogValue = "EditWatchDialogValue";
            GuiTextListCtrl      DebuggerWatchView    = "DebuggerWatchView";
            DebuggerEditWatchDlg DebuggerEditWatchDlg = "DebuggerEditWatchDlg";
            TCPDebugger          TCPDebugger          = "TCPDebugger";
            GuiCanvas            Canvas = "Canvas";

            string newValue = EditWatchDialogValue.getValue();
            int    id       = DebuggerWatchView.getSelectedId();

            if (id >= 0)
            {
                string row  = DebuggerWatchView.getRowTextById(id);
                string expr = omni.Util.getField(row, 0);
                string assignment;
                if (newValue == "")
                {
                    assignment = expr + " = \"\"";
                }
                else
                {
                    assignment = expr + " = " + newValue;
                }
                TCPDebugger.send("EVAL " + id + " 0 " + assignment + "\r\n");
            }
            Canvas.popDialog(DebuggerEditWatchDlg);
        }
Пример #3
0
        public static void DbgRefreshWatches()
        {
            GuiTextListCtrl DebuggerWatchView = "DebuggerWatchView";
            TCPDebugger     TCPDebugger       = "TCPDebugger";

            for (int i = 0; i < DebuggerWatchView.rowCount(); i++)
            {
                int    id   = DebuggerWatchView.getRowId(i);
                string row  = DebuggerWatchView.getRowTextById(id);
                string expr = omni.Util.getField(row, 0);
                TCPDebugger.send("EVAL " + id + " 0 " + expr + "\r\n");
            }
        }
Пример #4
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());
        }
Пример #5
0
        public static void DbgSetCursorWatch(string expr)
        {
            GuiTextCtrl DebuggerCursorWatch = "DebuggerCursorWatch";
            TCPDebugger TCPDebugger         = "TCPDebugger";

            DebuggerCursorWatch["expr"] = expr;
            if (DebuggerCursorWatch["expr"] == "")
            {
                DebuggerCursorWatch.setText("");
            }
            else
            {
                TCPDebugger.send("EVAL -1 0 " + DebuggerCursorWatch["expr"] + "\r\n");
            }
        }
Пример #6
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");
        }
Пример #7
0
        public static void DbgWatchDialogAdd()
        {
            GuiTextEditCtrl  WatchDialogExpression = "WatchDialogExpression";
            GuiTextListCtrl  DebuggerWatchView     = "DebuggerWatchView";
            TCPDebugger      TCPDebugger           = "TCPDebugger";
            DebuggerWatchDlg DebuggerWatchDlg      = "DebuggerWatchDlg";
            GuiCanvas        Canvas = "Canvas";

            string expr = WatchDialogExpression.getValue();

            if (expr != "")
            {
                DebuggerWatchView.setRowById(omni.iGlobal["$DbgWatchSeq"], expr + "\t(unknown)");
                TCPDebugger.send("EVAL " + omni.iGlobal["$DbgWatchSeq"] + " 0 " + expr + "\r\n");
                omni.iGlobal["$DbgWatchSeq"]++;
            }
            Canvas.popDialog(DebuggerWatchDlg);
        }
Пример #8
0
        public static void DbgOpenFile(string file, int line, bool selectLine)
        {
            DebuggerFileView DebuggerFileView = "DebuggerFileView";
            TCPDebugger      TCPDebugger      = "TCPDebugger";

            if (file != "")
            {
                // Open the file in the file view.
                if (DebuggerFileView.open(file))
                {
                    // Go to the line.
                    DebuggerFileView.setCurrentLine(line, selectLine);
                    // Get the breakpoints for this file.
                    if (file != omni.sGlobal["$DebuggerFile"])
                    {
                        TCPDebugger.send("BREAKLIST " + file + "\r\n");
                        omni.sGlobal["$DebuggerFile"] = file;
                    }
                }
            }
        }
Пример #9
0
        public static void dbgContinue()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("CONTINUE\r\n");
        }
Пример #10
0
        public static void dbgStepOver()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("STEPOVER\r\n");
        }
Пример #11
0
        public static void dbgStepOut()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("STEPOUT\r\n");
        }
Пример #12
0
        public static void dbgStepIn()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("STEPIN\r\n");
        }