Overwrite breakpoints when launching pygdb from vim, updating vim also after quit
[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 DbgTerminal
13 import GdbTerminal
14 import MainControlWindow
15 import StatusWindow
16
17
18 def launchDebugger(clientCmd):
19
20 #Create Terminal
21 dbgterm = GdbTerminal.GdbTerminal(clientCmd)
22
23 #Create windows
24 mainCtrlWnd = MainControlWindow.MainControlWindow(dbgterm)
25 statusWnd = StatusWindow.StatusWindow(dbgterm)
26 dbgterm.initialize()
27
28 #Load configuration
29 conf = Configuration.Configuration()
30 conf.load(".pygdb.conf")
31 statusWnd.applyConfiguration(conf)
32
33 gtk.main()
34
35 #Store config
36 conf = Configuration.Configuration()
37 statusWnd.fillConfiguration(conf)
38 conf.delCurrpos()
39 conf.store(".pygdb.conf")
40
41 DbgTerminal.updateVim()
42
43
44
45 if __name__ == "__main__":
46
47 #Check if enough arguments are given
48 if len(sys.argv) <= 1:
49 print "Please give executeable to debug."
50 sys.exit(-1)
51
52 #Create the terminals
53 clientCmd = string.join(sys.argv[1:])
54 launchDebugger(clientCmd)
55
56