Author: Armin Rigo <ar...@tunes.org>
Branch: reverse-debugger
Changeset: r85492:bbb6f37c65f4
Date: 2016-07-01 16:39 +0200
http://bitbucket.org/pypy/pypy/changeset/bbb6f37c65f4/

Log:    Clean up, fixes reverse-watchpoints stopping one step too far in the
        past

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
@@ -189,12 +189,8 @@
                 'Reverse-hit' if backward else 'Hit',
                 kind, num, name))
         self.print_extra_pending_info = '\n'.join(printing)
-        target_time = b.time
-        if backward:
-            target_time -= 1   # when going backwards, we stop just before
-                               # the breakpoint time, as opposed to just after
-        if self.pgroup.get_current_time() != target_time:
-            self.pgroup.jump_in_time(target_time)
+        if self.pgroup.get_current_time() != b.time:
+            self.pgroup.jump_in_time(b.time)
 
     def remove_tainting(self):
         if self.pgroup.is_tainted():
diff --git a/rpython/translator/revdb/src-revdb/revdb.c 
b/rpython/translator/revdb/src-revdb/revdb.c
--- a/rpython/translator/revdb/src-revdb/revdb.c
+++ b/rpython/translator/revdb/src-revdb/revdb.c
@@ -1106,8 +1106,8 @@
         return;   /* ignored breakpoints */
 
     case 'r':     /* record the breakpoint but continue */
-        if (last_recorded_breakpoint_loc != rpy_revdb.stop_point_seen + 1) {
-            last_recorded_breakpoint_loc = rpy_revdb.stop_point_seen + 1;
+        if (last_recorded_breakpoint_loc != rpy_revdb.stop_point_seen) {
+            last_recorded_breakpoint_loc = rpy_revdb.stop_point_seen;
             n_last_recorded_breakpoints = 0;
         }
         if (n_last_recorded_breakpoints < RECORD_BKPT_NUM) {
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to