changed some stuff of active/inactive detection
[pygdb.git] / GdbTerminal.py
index 8600c90d0a94e4e7f1f1733f15a1bf70f8551727..15cb11df2bb233c8c7881db3e2c255cf0de77327 100755 (executable)
@@ -179,15 +179,20 @@ class GdbTerminal (DbgTerminal.DbgTerminal):
        def testForInactivity(self, his):
                """Test whether debugger got inactive"""                
                line = self.history[his]
-               rxcont = re.compile("^\(gdb\)\s+(cont|step|next|stepi|nexti)")
 
                if string.find(line, "Starting program:") == 0:
                        prog = string.join( string.split(line)[1:])
                        return "started", prog
 
-               if rxcont.search(line):
+               if string.find(line, "Continuing.") == 0:
                        return "continued", None
 
+               if string.find(line, "\x1a\x1a") == 0:
+                       rxcont = re.compile("^\(gdb\)\s+(cont|step|next|stepi|nexti)")
+
+                       if rxcont.search(self.history[his-1]):
+                               return "stepped", None
+
                return None