self.waitForActivation(his)
def setRun(self):
-
his = self.getHistoryLen()
argv = string.join(string.split(self.clientCmd)[1:])
self.feed_child("run " + argv + "\n")
def delBreakpoint(self, breakpoint):
+ his = self.getHistoryLen()
self.feed_child("del breakpoint %s\n" % (breakpoint,))
+ self.waitForActivation(his)
def getBreakpoints(self):
starthis = self.getHistoryLen()
self.feed_child("info breakpoints\n")
-
- rx = re.compile("^\(gdb\) ")
- endhis, response = self.waitForRx(rx, starthis)
-
+ endhis, response = self.__waitForPrompt(starthis)
rxbp = re.compile("^\d+\s+breakpoint")
rxpos = re.compile("^.* at \S+:\d+$")
his = self.getHistoryLen()
self.feed_child("print " + expr + "\n")
-
- rx = re.compile("^\(gdb\)")
- his, response = self.waitForRx(rx, his)
-
+ his, response = self.__waitForPrompt(his)
answer = self.history[his-1]
if len(string.split(answer, "=")) == 1:
def waitForActivation(self, starthis):
self.setActive(False)
- rx = re.compile("^\(gdb\)")
- endhis, response = self.waitForRx(rx,starthis)
+ endhis, response = self.__waitForPrompt(starthis)
self.setActive(True)
for his in reversed(range(starthis+1,endhis)):
return None
+ def __waitForPrompt(self, his):
+ rx = re.compile("^\(gdb\) ")
+ return self.waitForRx(rx,his)
+
+
+
if __name__ == "__main__":