+ def waitForPrompt(self, his):
+ rx = "^\(gdb\)"
+ return self.waitForRx(rx,his)
+
+
+ def testForActivity(self, his):
+ """Test whether debugger got active again"""
+
+ line = self.history[his]
+
+ if string.find(line, "\x1a\x1a") == 0:
+ tuples = string.split(line[2:], ":")
+ tuples[1] = int(tuples[1])
+ return "break", [tuples[0], int(tuples[1])]
+
+ if string.find(line, "Program exited") == 0:
+ code = string.split(line)[-1]
+ code = code[1:-1]
+
+ codeno = 0
+ for c in code:
+ codeno = codeno*8 + int(c)
+
+ return "exited", codeno
+
+ return None
+
+
+ def testForInactivity(self, his):
+ """Test whether debugger got inactive"""
+ line = self.history[his]
+
+ if string.find(line, "Starting program:") == 0:
+ prog = string.join( string.split(line)[1:])
+ return "started", prog