projects
/
pygdb.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some code beautifying incl. waitForRx
[pygdb.git]
/
DbgTerminal.py
diff --git
a/DbgTerminal.py
b/DbgTerminal.py
index 543cadc893144bc0c378bb2cd4e09be082f9b76a..6fec9f3e789f40cff60e62de2561d271ca81164e 100644
(file)
--- a/
DbgTerminal.py
+++ b/
DbgTerminal.py
@@
-88,16
+88,16
@@
class DbgTerminal (vte.Terminal):
return len(self.history)
def waitForRx(self, rx, start):
return len(self.history)
def waitForRx(self, rx, start):
-
curr = start
curr = start
-
while True:
while True:
- for no in range(max(curr-1,start), self.getHistoryLen()):
+ assert( curr>=start )
+ for no in range(curr, self.getHistoryLen()):
line = self.history[no]
if rx.search(line):
return no, line
line = self.history[no]
if rx.search(line):
return no, line
- curr = max(start,self.getHistoryLen())
+ #Do not forget the last line
+ curr = max(start,self.getHistoryLen()-1)
gtk.main_iteration()
gtk.main_iteration()