X-Git-Url: https://git.sthu.org/?p=pygdb.git;a=blobdiff_plain;f=pygdb.py;h=64c48df01fc383ffef040277475070f40b1c3949;hp=e6c1dbccb64a0d29ada143869b91c4917fcce1aa;hb=d5dc6369fca636f78c76f0f95aefb9817289e27f;hpb=1a0bc6a0b5ed8f42aca890ff0ebc4adb8831b6fc diff --git a/pygdb.py b/pygdb.py index e6c1dbc..64c48df 100755 --- a/pygdb.py +++ b/pygdb.py @@ -12,15 +12,8 @@ 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:]) +def launchDebugger(clientCmd): + #Create Terminal dbgterm = GdbTerminal.GdbTerminal(clientCmd) #Create windows @@ -34,3 +27,15 @@ if __name__ == "__main__": +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) + +