projects
/
pygdb.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added watches and status line
[pygdb.git]
/
GdbTerminal.py
diff --git
a/GdbTerminal.py
b/GdbTerminal.py
index 12256c1d0066e73b4d1f80dc69afbceae38f1cc8..bcd857ac5ef5428fdc0fc435a57a0cba5d8b7047 100755
(executable)
--- a/
GdbTerminal.py
+++ b/
GdbTerminal.py
@@
-32,23
+32,23
@@
class GdbTerminal (DbgTerminal.DbgTerminal):
his = self.getHistoryLen()
argv = string.join(string.split(self.clientCmd)[1:])
self.feed_dbg("run " + argv + "\n")
his = self.getHistoryLen()
argv = string.join(string.split(self.clientCmd)[1:])
self.feed_dbg("run " + argv + "\n")
- return self.waitFor
Posi
tion(his)
+ return self.waitFor
Activa
tion(his)
def setContinue(self):
his = self.getHistoryLen()
self.feed_dbg("cont\n");
def setContinue(self):
his = self.getHistoryLen()
self.feed_dbg("cont\n");
- return self.waitFor
Posi
tion(his)
+ return self.waitFor
Activa
tion(his)
def setStepover(self):
his = self.getHistoryLen()
self.feed_dbg("next\n");
def setStepover(self):
his = self.getHistoryLen()
self.feed_dbg("next\n");
- return self.waitFor
Posi
tion(his)
+ return self.waitFor
Activa
tion(his)
def setStepin(self):
his = self.getHistoryLen()
self.feed_dbg("step\n");
def setStepin(self):
his = self.getHistoryLen()
self.feed_dbg("step\n");
- return self.waitFor
Posi
tion(his)
+ return self.waitFor
Activa
tion(his)
def setQuit(self):
self.feed_dbg("quit\n")
def setQuit(self):
self.feed_dbg("quit\n")
@@
-63,16
+63,24
@@
class GdbTerminal (DbgTerminal.DbgTerminal):
his = self.getHistoryLen()
self.feed_dbg("print " + expr + "\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)
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()
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)
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:], ":")
if self.history[his-1][0:2]=="\x1a\x1a":
tuples = string.split(self.history[his-1][2:], ":")