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(""); }
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); }
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"); } }
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()); }
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"); } }
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"); }
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); }
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; } } } }
public static void dbgContinue() { TCPDebugger TCPDebugger = "TCPDebugger"; TCPDebugger.send("CONTINUE\r\n"); }
public static void dbgStepOver() { TCPDebugger TCPDebugger = "TCPDebugger"; TCPDebugger.send("STEPOVER\r\n"); }
public static void dbgStepOut() { TCPDebugger TCPDebugger = "TCPDebugger"; TCPDebugger.send("STEPOUT\r\n"); }
public static void dbgStepIn() { TCPDebugger TCPDebugger = "TCPDebugger"; TCPDebugger.send("STEPIN\r\n"); }