__author__ = "shuber"
import gtk
+import os
import string
import sys
+import Configuration
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)
+def launchDebugger(clientCmd):
- #Create the terminals
- clientCmd = string.join(sys.argv[1:])
+ #Create Terminal
dbgterm = GdbTerminal.GdbTerminal(clientCmd)
#Create windows
mainCtrlWnd = MainControlWindow.MainControlWindow(dbgterm)
statusWnd = StatusWindow.StatusWindow(mainCtrlWnd, dbgterm)
+ dbgterm.initialize()
- #Register callback function for new positions
- mainCtrlWnd.newPosCbs += [statusWnd.updateValues]
-
+ #Load configuration
+ conf = Configuration.Configuration()
+ conf.load(".pygdb.conf")
+ statusWnd.applyConfiguration(conf)
+
gtk.main()
+ #Store config
+ conf = Configuration.Configuration()
+ statusWnd.fillConfiguration(conf)
+ conf.store(".pygdb.conf")
+
+
+
+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:])
+ launchDebugger(clientCmd)