be9ecb05444d1036c3fa9feaa35df6945f3e8daf
[pygdb.git] / pygdb.py
1 #!/usr/bin/python
2 #shuber, 2008-06-08
3
4 __author__ = "shuber"
5
6 import gtk
7 import string
8 import sys
9
10 import GdbTerminal
11 import MainControlWindow
12 import StatusWindow
13
14
15 def launchDebugger(clientCmd):
16 #Create Terminal
17 dbgterm = GdbTerminal.GdbTerminal(clientCmd)
18
19 #Create windows
20 mainCtrlWnd = MainControlWindow.MainControlWindow(dbgterm)
21 statusWnd = StatusWindow.StatusWindow(mainCtrlWnd, dbgterm)
22 dbgterm.initialize()
23
24 print "run"
25 gtk.main()
26
27
28
29 if __name__ == "__main__":
30
31 #Check if enough arguments are given
32 if len(sys.argv) <= 1:
33 print "Please give executeable to debug."
34 sys.exit(-1)
35
36 #Create the terminals
37 clientCmd = string.join(sys.argv[1:])
38 launchDebugger(clientCmd)
39
40