adding a callable facade pygdb
[pygdb.git] / pygdb.py
diff --git a/pygdb.py b/pygdb.py
new file mode 100755 (executable)
index 0000000..e6c1dbc
--- /dev/null
+++ b/pygdb.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+#shuber, 2008-06-08
+
+__author__ = "shuber"
+
+import gtk
+import string
+import sys
+
+import GdbTerminal
+import MainControlWindow
+import StatusWindow
+
+
+if __name__ == "__main__":
+
+       #Check if enough arguments are given
+       if len(sys.argv) <= 1:
+               print "Please give executeable to debug."
+               sys.exit(-1)
+
+       #Create the terminals
+       clientCmd = string.join(sys.argv[1:])
+       dbgterm = GdbTerminal.GdbTerminal(clientCmd)
+
+       #Create windows
+       mainCtrlWnd = MainControlWindow.MainControlWindow(dbgterm)
+       statusWnd = StatusWindow.StatusWindow(mainCtrlWnd, dbgterm)
+
+       #Register callback function for new positions
+       mainCtrlWnd.newPosCbs += [statusWnd.updateValues]
+
+       gtk.main()
+
+
+