Author: Armin Rigo <ar...@tunes.org> Branch: reverse-debugger Changeset: r85420:0cc665a2fb4e Date: 2016-06-28 11:11 +0200 http://bitbucket.org/pypy/pypy/changeset/0cc665a2fb4e/
Log: Bug fix 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 @@ -3,7 +3,7 @@ import traceback from contextlib import contextmanager -from rpython.translator.revdb.process import ReplayProcessGroup, maxint64 +from rpython.translator.revdb.process import ReplayProcessGroup from rpython.translator.revdb.process import Breakpoint r_cmdline = re.compile(r"(\S+)\s*(.*)") 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 @@ -3,9 +3,6 @@ from rpython.translator.revdb.message import * -maxint64 = int(2**63 - 1) - - class Breakpoint(Exception): def __init__(self, time, num): self.time = time @@ -24,7 +21,9 @@ self.stack_depth = 0 # breaks if the depth becomes lower than this def __repr__(self): - return 'AllBreakpoints(%r, %d)' % (self.num2name, self.stack_depth) + return 'AllBreakpoints(%r, %r, %r, %d)' % ( + self.num2name, self.watchvalues, self.watchuids, + self.stack_depth) def compare(self, other): if (self.num2name == other.num2name and @@ -334,6 +333,8 @@ if self.all_breakpoints.watchuids: uids = set() uids.update(*self.all_breakpoints.watchuids.values()) + #print self.all_breakpoints + #print '\t===>', uids self.attach_printed_objects(uids, watch_env=True) def update_breakpoints(self): @@ -379,6 +380,7 @@ if name.startswith('W'): _, text = self.check_watchpoint_expr(name[1:]) if text != self.all_breakpoints.watchvalues[num]: + #print self.active.pid print 'updating watchpoint value: %s => %s' % ( name[1:], text) self.all_breakpoints.watchvalues[num] = text @@ -454,6 +456,10 @@ future_uids.sort() pack_uids = [struct.pack('q', uid) for uid in future_uids] pack_uids = ''.join(pack_uids) + #print '%d: from %d: CMD_FUTUREIDS %r' % ( + # self.active.pid, + # self.active.current_time, + # future_uids) self.active.send(Message(CMD_FUTUREIDS, extra=pack_uids)) self.active.expect_ready() self.active.printed_objects = ( @@ -480,6 +486,8 @@ def attach_printed_objects(self, uids, watch_env): for uid in uids: nid = self.all_printed_objects[uid] + #print '%d: %s => %s (watch_env=%d)' % (self.active.pid, nid, uid, + # watch_env) self.active.send(Message(CMD_ATTACHID, nid, uid, int(watch_env))) self.active.expect_ready() 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 @@ -1155,7 +1155,7 @@ rpy_revdb_commands.rp_alloc(uid, new_object); unprotect_jmpbuf(); } - uid_break = *future_next_id++; + uid_break = *++future_next_id; restore_state(); rpy_revdb.watch_enabled = watch_enabled; return uid; _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit