X-Git-Url: https://git.sthu.org/?p=pygdb.git;a=blobdiff_plain;f=BreakpointsFrame.py;h=8450699eb4c5e970cd73837bf4ffba2ec177f436;hp=0d3bcf2cf8f5204a04d601242cf9ba5db7692610;hb=HEAD;hpb=74af4d713d7a7456beabc86693e2cc53819e7935 diff --git a/BreakpointsFrame.py b/BreakpointsFrame.py index 0d3bcf2..8450699 100644 --- a/BreakpointsFrame.py +++ b/BreakpointsFrame.py @@ -22,6 +22,8 @@ class BreakpointsFrame (StatusFrame.StatusFrame): StatusFrame.StatusFrame.__init__(self, debugger) self.set_label("Breakpoints") + debugger.gotActiveCallback += [self.updateValues] + vbox = gtk.VBox(False, 5) self.add(vbox) @@ -100,7 +102,6 @@ class BreakpointsFrame (StatusFrame.StatusFrame): def addBreakpoint(self, file, lineno, cond=None): no = self.debugger.setBreakpoint(file, lineno, cond) - if no!=None: self.addBreakpointToList(no, file, lineno, cond) else: @@ -115,13 +116,19 @@ class BreakpointsFrame (StatusFrame.StatusFrame): def applyConfiguration(self, conf): for b in conf.breakpoints: self.addBreakpoint(b["file"], b["lineno"], b["cond"]) - self.updateValues(None) + self.updateValues(None, None) def fillConfiguration(self, conf): iter = self.model.get_iter_first() while iter != None: spec, = self.model.get(iter, 1) - conf.parseBreak(spec) + + #Replacing file by absolute path + file = string.split(spec, ":")[0] + file = self.debugger.toAbsPath(file) + postfile = string.join( string.split(spec,":")[1:], ":") + + conf.parseBreak(file + ":" + postfile ) iter = self.model.iter_next(iter) @@ -169,7 +176,7 @@ class BreakpointsFrame (StatusFrame.StatusFrame): return - ifsplit = string.split(bpspec, "if") + ifsplit = string.split(bpspec, " if ") if len(ifsplit)>1: cond = ifsplit[1].strip() @@ -204,10 +211,10 @@ class BreakpointsFrame (StatusFrame.StatusFrame): if not self.debugger.isActive(): return - self.updateValues(None) + self.updateValues(None, None) - def updateValues(self, pos): + def updateValues(self, status, param): bpnts = self.debugger.getBreakpoints()