- Fixed bug when bp is set on same addr
[pygdb.git] / pygdb.py
1 #!/usr/bin/python
2 #shuber, 2008-06-08
3
4 __author__ = "shuber"
5
6 import gtk
7 import os
8 import string
9 import sys
10
11 import Configuration
12 import GdbTerminal
13 import MainControlWindow
14 import StatusWindow
15
16
17 def launchDebugger(clientCmd):
18
19 #Create Terminal
20 dbgterm = GdbTerminal.GdbTerminal(clientCmd)
21
22 #Create windows
23 mainCtrlWnd = MainControlWindow.MainControlWindow(dbgterm)
24 statusWnd = StatusWindow.StatusWindow(mainCtrlWnd, dbgterm)
25 dbgterm.initialize()
26
27 #Load configuration
28 conf = Configuration.Configuration()
29 conf.load(".pygdb.conf")
30 statusWnd.applyConfiguration(conf)
31
32 gtk.main()
33
34 #Store config
35 conf = Configuration.Configuration()
36 statusWnd.fillConfiguration(conf)
37 conf.store(".pygdb.conf")
38
39
40
41 if __name__ == "__main__":
42
43 #Check if enough arguments are given
44 if len(sys.argv) <= 1:
45 print "Please give executeable to debug."
46 sys.exit(-1)
47
48 #Create the terminals
49 clientCmd = string.join(sys.argv[1:])
50 launchDebugger(clientCmd)
51
52