]> git.sthu.org Git - pygdb.git/commitdiff
fixing bug: parsing cond. breakpoint
authorStefan Huber <shuber2@gmail.com>
Fri, 13 Jun 2008 13:14:08 +0000 (15:14 +0200)
committerStefan Huber <shuber2@gmail.com>
Fri, 13 Jun 2008 13:14:08 +0000 (15:14 +0200)
BreakpointsFrame.py
Configuration.py
GdbTerminal.py
featurerequest.txt

index b3e0030a9627475465ed076792d0a04e795b8618..8450699eb4c5e970cd73837bf4ffba2ec177f436 100644 (file)
@@ -176,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()
index 6f08a20b442bb2ab9073adc5e243fdecf5b583a6..460b897db207f611346f01b2e02d05a35fc67b0c 100644 (file)
@@ -88,8 +88,8 @@ class Configuration:
                        print "Wrong breakpoint format:", tail
                        return
 
-               preif = string.split(tail, "if")[0].strip()
-               postif = string.join( string.split(tail, "if")[1:], "if").strip()
+               preif = string.split(tail, " if ")[0].strip()
+               postif = string.join( string.split(tail, " if ")[1:], " if ").strip()
 
                [file,lineno] = string.split(preif, ":")
                lineno = int(lineno)
index 81a6300ca19abafd894007a865b7c47e7e6e9746..ff6dc6b37356133c8d526fbb1f02f9f0dd6c9d3a 100644 (file)
@@ -104,8 +104,7 @@ class GdbTerminal (DbgTerminal.DbgTerminal):
 
                        #This line does not contain the file!
                        if not rxpos.search(line):
-                               i += 1
-                               line = bplines[i]
+                               continue
 
                        pos = string.split(line)[-1]
                        [file,lineno] = string.split(pos,":")
@@ -114,7 +113,7 @@ class GdbTerminal (DbgTerminal.DbgTerminal):
                        if i+1<len(bplines) and rxcond.search(bplines[i+1]):
                                i +=1
                                line = bplines[i]
-                               pre,cond = string.split(line,"if")
+                               cond = string.join(string.split(line," if ")[1:], " if ")
                                cond = cond.strip()
 
                        bpnts += [[no, file, lineno, cond]]
index 72d65899fef7c4f2a9abf457eeb1a27f403d2bd7..4d7f8bd27bc5a6f62ab74a85e92279d64e01122a 100644 (file)
@@ -1,6 +1,5 @@
 Smaller requests
   - vim: do not add breakpoints when pressing F5, just replace them all
-  - error parsing conditional breakpoint from Entry
   - error when readreading the condition of breakpoints! (stop only if...)
 
                (gdb) info breakpoints