+ self.feed_child("run " + argv + "\n")
+ return self.waitForActivation(his)
+
+
+ def setContinue(self):
+ his = self.getHistoryLen()
+ self.feed_child("cont\n");
+ return self.waitForActivation(his)
+
+ def setStepover(self):
+ his = self.getHistoryLen()
+ self.feed_child("next\n");
+ return self.waitForActivation(his)
+
+ def setStepin(self):
+ his = self.getHistoryLen()
+ self.feed_child("step\n");
+ return self.waitForActivation(his)
+
+ def setQuit(self):
+ self.feed_child("quit\n")
+ self.waitForNewline()
+ self.feed_child("y\n");
+
+ def setBreakpoint(self, file, lineno, condition=None):
+ his = self.getHistoryLen()
+ if condition==None:
+ self.feed_child("break %s:%s\n" % (file, str(lineno)))
+ else:
+ self.feed_child("break %s:%s if %s\n" % \
+ (file, str(lineno), condition))
+
+ rx = re.compile("^Breakpoint |^No|^\(gdb\) ")
+ his, response = self.waitForRx(rx, his)
+
+ print his, response
+
+ if response[0:10] == "Breakpoint":
+ return string.split(response)[1].strip()
+ if response[0:5] == "(gdb)":
+ return None
+ if response[0:14] == "No source file":
+ self.feed_child("n\n");
+ return None
+ if response[0:3] == "No ":
+ return None
+
+ return NotImplementedError()
+
+ def delBreakpoint(self, breakpoint):
+ self.feed_child("del breakpoint %s\n" % (breakpoint,))