X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=pygdb.py;h=6b6f5d3d2953a45b2ec603e2d4eef31ffc850b9d;hb=b029ee3dd1a5a785737e73ac6fc024a58d855104;hp=e6c1dbccb64a0d29ada143869b91c4917fcce1aa;hpb=1a0bc6a0b5ed8f42aca890ff0ebc4adb8831b6fc;p=pygdb.git diff --git a/pygdb.py b/pygdb.py index e6c1dbc..6b6f5d3 100755 --- a/pygdb.py +++ b/pygdb.py @@ -4,33 +4,49 @@ __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)