python << >>
import gtk
+import os
import string
import sys
import threading
-#Breakpoint positions: List of dictionaries of form {"signnum" : , "file" : , "lineno":, "cond" : }
+#Breakpoint positions: List of dictionaries of form
+#{"signnum" : , "file" : , "lineno":, "cond" : }
gdbBps = []
signnum = 0
clientcmd = ""
if lineno==None:
lineno = vim.current.window.cursor[0]
if file==None:
- file = vim.current.window.buffer.name
+ file = getCurrentFile()
#Determine index of breakpoint
bpidx = gdbGetBreakpoint( file, lineno )
if lineno==None:
lineno = vim.current.window.cursor[0]
if file==None:
- file = vim.current.window.buffer.name
+ file = getCurrentFile()
#Determine index of breakpoint
bpidx = gdbGetBreakpoint( file, lineno )
gdbBps += [b]
+def getCurrentFile():
+ splitted = string.split(vim.current.window.buffer.name, os.sep)
+ return splitted[-1]
+
+
+
def gdbNewSignnum():
global signnum
signnum += 1