]> git.sthu.org Git - pygdb.git/commitdiff
Add gdbWriteConfig()
authorStefan Huber <shuber@sthu.org>
Sun, 8 Sep 2013 17:57:55 +0000 (19:57 +0200)
committerStefan Huber <shuber@sthu.org>
Sun, 8 Sep 2013 18:01:40 +0000 (20:01 +0200)
pygdb.vim

index 9486db462b189d6a0ee6a326f6b82dd4c412ddf5..79a557e074dafc0824832121de074825bd03e619 100644 (file)
--- a/pygdb.vim
+++ b/pygdb.vim
@@ -51,13 +51,7 @@ def gdbLaunch():
                print "No command given!"
                return
 
-       #Add the breakpoints to the configuration
-       conf = Configuration.Configuration()
-       conf.load(".pygdb.conf")
-       conf.breakpoints = []
-       for bp in gdbBps:
-               conf.addBreak(bp["file"], bp["lineno"], bp["cond"])
-       conf.store(".pygdb.conf")
+       gdbWriteConfig()
        
        vim.command("!python %s/pygdb.py --vim-servername %s %s &\n" % (pygdbdir, vim.eval("v:servername"), clientcmd))
 
@@ -259,6 +253,18 @@ def gdbLoadConfig():
        else:
                delExecutionLine()
 
+               
+def gdbWriteConfig():
+
+       #Add the breakpoints to the configuration
+       conf = Configuration.Configuration()
+       conf.load(".pygdb.conf")
+       conf.breakpoints = []
+       for bp in gdbBps:
+               conf.addBreak(bp["file"], bp["lineno"], bp["cond"])
+       conf.store(".pygdb.conf")
+
+
 >>
 
 highlight ExecutionLine term=bold ctermbg=DarkGreen ctermfg=Black guibg=LightGreen guifg=Black