From: Stefan Huber Date: Fri, 13 Jun 2008 13:23:20 +0000 (+0200) Subject: Overwrite breakpoints when launching pygdb from vim, updating vim also after quit X-Git-Tag: v0.99.1~5 X-Git-Url: https://git.sthu.org/?p=pygdb.git;a=commitdiff_plain;h=afd9117c8d1d5f614acc120f28c668655be20abf Overwrite breakpoints when launching pygdb from vim, updating vim also after quit --- diff --git a/DbgTerminal.py b/DbgTerminal.py index 9c1d8b3..8fc569f 100644 --- a/DbgTerminal.py +++ b/DbgTerminal.py @@ -238,6 +238,10 @@ def quitHandler(*w): pass +def updateVim(): + os.system('gvim --servername pygdb --remote-send ":GDBLoadConfig"') + + def relToAbsPath(absfile, relfile): """When an absfile is given and a relfile is given by relative paths relative to absfile, determine the abs diff --git a/StatusWindow.py b/StatusWindow.py index 6c918e5..07abd4c 100644 --- a/StatusWindow.py +++ b/StatusWindow.py @@ -99,6 +99,7 @@ class StatusWindow (gtk.Window): self.fillConfiguration(conf) conf.store(".pygdb.conf") - os.system('gvim --servername pygdb --remote-send ":GDBLoadConfig"') + DbgTerminal.updateVim() + diff --git a/featurerequest.txt b/featurerequest.txt index 4da5c37..fa71310 100644 --- a/featurerequest.txt +++ b/featurerequest.txt @@ -1,5 +1,4 @@ Smaller requests - - vim: do not add breakpoints when pressing F5, just replace them all - error when readreading the condition of breakpoints! (stop only if...) (gdb) info breakpoints diff --git a/pygdb.py b/pygdb.py index 020001b..bbdd04e 100755 --- a/pygdb.py +++ b/pygdb.py @@ -9,6 +9,7 @@ import string import sys import Configuration +import DbgTerminal import GdbTerminal import MainControlWindow import StatusWindow @@ -36,6 +37,8 @@ def launchDebugger(clientCmd): statusWnd.fillConfiguration(conf) conf.delCurrpos() conf.store(".pygdb.conf") + + DbgTerminal.updateVim() diff --git a/pygdb.vim b/pygdb.vim index ea552d3..d7b68e7 100644 --- a/pygdb.vim +++ b/pygdb.vim @@ -39,6 +39,7 @@ def gdbLaunch(): #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")