rx = re.compile("^Breakpoint |^No|^\(gdb\) ")
his, response = self.waitForRx(rx, his)
- print his, response
-
if response[0:10] == "Breakpoint":
return string.split(response)[1].strip()
if response[0:5] == "(gdb)":
def gdbLaunch():
global gdbterm, mainctrlwnd, statuswnd, gdbBps, clientcmd, gdbthread
- if gdbterm == None:
- clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd)
+ clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd)
+ gdbterm, mainctrlwnd, statuswnd = pygdb.launchDebugger(clientcmd, False)
- gdbterm, mainctrlwnd, statuswnd = pygdb.launchDebugger(clientcmd, False)
+ for bp in gdbBps:
+ statuswnd.breakpointsFrame.addBreakpoint(bp["file"], bp["lineno"], bp["cond"])
- for bp in gdbBps:
- statuswnd.breakpointsFrame.addBreakpoint(bp["file"], bp["lineno"], bp["cond"])
-
- gtk.main()
- gdbterm = None
+ print "Started dbg session."
+ gtk.main()
+ print "Finished dbg session."
def gdbToggleBreakpoint(lineno=None, file=None):