コード例 #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 DbgConnect()
        {
            TCPDebugger        TCPDebugger             = "TCPDebugger";
            GuiTextEditCtrl    DebuggerConnectAddress  = "DebuggerConnectAddress";
            GuiTextEditCtrl    DebuggerConnectPort     = "DebuggerConnectPort";
            GuiTextEditCtrl    DebuggerConnectPassword = "******";
            DebuggerConnectDlg DebuggerConnectDlg      = "DebuggerConnectDlg";
            GuiCanvas          Canvas = "Canvas";

            string address  = DebuggerConnectAddress.getValue();
            string port     = DebuggerConnectPort.getValue();
            string password = DebuggerConnectPassword.getValue();

            if ((address != "") && (port != "") && (password != ""))
            {
                TCPDebugger.connect(address + ":" + port);
                TCPDebugger.schedule("5000", "send", password + "\r\n");
                TCPDebugger["password"] = password;
            }

            Canvas.popDialog(DebuggerConnectDlg);
        }
コード例 #10
0
        public static void dbgContinue()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("CONTINUE\r\n");
        }
コード例 #11
0
        public static void dbgStepOver()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("STEPOVER\r\n");
        }
コード例 #12
0
        public static void dbgStepOut()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

            TCPDebugger.send("STEPOUT\r\n");
        }
コード例 #13
0
        public static void dbgStepIn()
        {
            TCPDebugger TCPDebugger = "TCPDebugger";

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