From afd9117c8d1d5f614acc120f28c668655be20abf Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Fri, 13 Jun 2008 15:23:20 +0200 Subject: [PATCH] Overwrite breakpoints when launching pygdb from vim, updating vim also after quit --- DbgTerminal.py | 4 ++++ StatusWindow.py | 3 ++- featurerequest.txt | 1 - pygdb.py | 3 +++ pygdb.vim | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) 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") -- 2.39.5