Author: Armin Rigo <[email protected]>
Branch: reverse-debugger
Changeset: r85321:76a8da332a75
Date: 2016-06-22 10:38 +0200
http://bitbucket.org/pypy/pypy/changeset/76a8da332a75/

Log:    tweaks

diff --git a/rpython/translator/revdb/interact.py 
b/rpython/translator/revdb/interact.py
--- a/rpython/translator/revdb/interact.py
+++ b/rpython/translator/revdb/interact.py
@@ -22,6 +22,7 @@
         if executable is None:
             executable = fields[1]
         self.pgroup = ReplayProcessGroup(executable, revdb_log_filename)
+        self.print_extra_pending_info = None
 
     def interact(self):
         last_command = 'help'
@@ -30,6 +31,10 @@
             last_time = self.pgroup.get_current_time()
             if last_time != previous_time:
                 print
+            if self.print_extra_pending_info:
+                print self.print_extra_pending_info
+                self.print_extra_pending_info = None
+            if last_time != previous_time:
                 self.pgroup.show_backtrace(complete=0)
                 previous_time = last_time
             prompt = '(%d)$ ' % last_time
@@ -115,7 +120,7 @@
 
     def move_backward(self, steps):
         try:
-            self.pgroup.go_backward(steps)
+            self.pgroup.go_backward(steps, ignore_breakpoints=(steps==1))
             return True
         except Breakpoint as b:
             self.hit_breakpoint(b, backward=True)
@@ -123,7 +128,7 @@
 
     def hit_breakpoint(self, b, backward=False):
         if b.num != -1:
-            print 'Hit breakpoint %d' % (b.num,)
+            self.print_extra_pending_info = 'Hit breakpoint %d' % (b.num,)
         elif backward:
             b.time -= 1
         if self.pgroup.get_current_time() != b.time:
diff --git a/rpython/translator/revdb/process.py 
b/rpython/translator/revdb/process.py
--- a/rpython/translator/revdb/process.py
+++ b/rpython/translator/revdb/process.py
@@ -277,7 +277,7 @@
         if bkpt:
             raise bkpt
 
-    def go_backward(self, steps):
+    def go_backward(self, steps, ignore_breakpoints=False):
         """Go backward, for the given number of 'steps' of time.
 
         Closes the active process.  Implemented as jump_in_time()
@@ -285,7 +285,7 @@
         """
         assert steps >= 0
         initial_time = self.get_current_time()
-        if self.all_breakpoints.is_empty():
+        if self.all_breakpoints.is_empty() or ignore_breakpoints:
             self.jump_in_time(initial_time - steps)
         else:
             self._backward_search_forward(
@@ -300,7 +300,7 @@
             search_start_time = self.get_current_time()
             time_range_to_search = search_stop_time - search_start_time
             if time_range_to_search <= 0:
-                print "[not found]"
+                print "[search end]"
                 return
             print "[searching %d..%d]" % (search_start_time,
                                           search_stop_time)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to