Author: Armin Rigo <[email protected]>
Branch: reverse-debugger
Changeset: r86165:ff0f492637a5
Date: 2016-08-12 10:36 +0200
http://bitbucket.org/pypy/pypy/changeset/ff0f492637a5/

Log:    Fix

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
@@ -447,6 +447,7 @@
 
     def check_watchpoint_expr(self, compiled_code, nids=None):
         if nids:
+            self.ensure_nids_to_uids(nids)
             uids = self.nids_to_uids(nids)
             self.attach_printed_objects(uids, watch_env=True)
         self.active.send(Message(CMD_CHECKWATCH, extra=compiled_code))
@@ -542,6 +543,16 @@
             uids.append(uid)
         return uids
 
+    def ensure_nids_to_uids(self, nids):
+        # Take the objects listed in nids which are alive at the
+        # current time, and return a list of uids of them.  This
+        # might require some replaying.
+        uids = []
+        if nids:
+            uids = self.nids_to_uids(nids, skip_futures=True)
+            self.ensure_printed_objects(uids)
+        return uids
+
     def attach_printed_objects(self, uids, watch_env):
         for uid in uids:
             nid = self.all_printed_objects[uid]
@@ -559,11 +570,7 @@
     def print_cmd(self, expression, nids=[]):
         """Print an expression.
         """
-        uids = []
-        if nids:
-            uids = self.nids_to_uids(nids, skip_futures=True)
-            self.ensure_printed_objects(uids)
-        #
+        uids = self.ensure_nids_to_uids(nids)
         self.active.tainted = True
         self.attach_printed_objects(uids, watch_env=False)
         self.active.send(Message(CMD_PRINT, extra=expression))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to