his = self.getHistoryLen()
argv = string.join(string.split(self.clientCmd)[1:])
self.feed_dbg("run " + argv + "\n")
- return self.waitForPosition(his)
+ return self.waitForActivation(his)
def setContinue(self):
his = self.getHistoryLen()
self.feed_dbg("cont\n");
- return self.waitForPosition(his)
+ return self.waitForActivation(his)
def setStepover(self):
his = self.getHistoryLen()
self.feed_dbg("next\n");
- return self.waitForPosition(his)
+ return self.waitForActivation(his)
def setStepin(self):
his = self.getHistoryLen()
self.feed_dbg("step\n");
- return self.waitForPosition(his)
+ return self.waitForActivation(his)
def setQuit(self):
self.feed_dbg("quit\n")
his = self.getHistoryLen()
self.feed_dbg("print " + expr + "\n")
- rx = re.compile("^\$[1-9][0-9]* = .*$")
+ rx = re.compile("^\(gdb\) $")
his, response = self.waitForRx(rx, his)
- split = string.split(response, "=")
+ answer = self.history[his-1]
+
+ if len(string.split(answer, "=")) == 1:
+ return answer.strip()
+
+ split = string.split(answer, "=")
return string.join(split[1:], "=").strip()
- def waitForPosition(self, his):
+ def waitForActivation(self, his):
+
+ self.setActive(False)
rx = re.compile("^\(gdb\) $")
his, reponse = self.waitForRx(rx,his)
+ self.setActive(True)
if self.history[his-1][0:2]=="\x1a\x1a":
tuples = string.split(self.history[his-1][2:], ":")