Add LICENSE
[pygdb.git] / BreakpointsFrame.py
index 9f1fe98c53e931c2927796ff4d035fab48ecf55c..8450699eb4c5e970cd73837bf4ffba2ec177f436 100644 (file)
@@ -102,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:
@@ -123,7 +122,13 @@ class BreakpointsFrame (StatusFrame.StatusFrame):
                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)
 
 
@@ -171,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()