Author: Armin Rigo <[email protected]>
Branch: reverse-debugger
Changeset: r85378:50ca83c04dca
Date: 2016-06-24 22:11 +0200
http://bitbucket.org/pypy/pypy/changeset/50ca83c04dca/

Log:    Fix all tests

diff --git a/rpython/memory/gctransform/boehm.py 
b/rpython/memory/gctransform/boehm.py
--- a/rpython/memory/gctransform/boehm.py
+++ b/rpython/memory/gctransform/boehm.py
@@ -189,6 +189,7 @@
         WEAKLINK = lltype.Struct('WEAKLINK',
                                  ('addr', llmemory.Address))
     else:
+        # keep in sync with 'struct WEAKLINK' in revdb.c
         WEAKLINK = lltype.Struct('REVDB_WEAKLINK',
                                  ('addr', llmemory.Address),
                                  ('off_prev', lltype.SignedLongLong))
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
@@ -76,7 +76,7 @@
         return ''.join(pieces)
 
     def send(self, msg):
-        print 'SENT:', self.pid, msg
+        #print 'SENT:', self.pid, msg
         binary = struct.pack("iIqqq", msg.cmd, len(msg.extra),
                              msg.arg1, msg.arg2, msg.arg3)
         self.control_socket.sendall(binary + msg.extra)
@@ -86,7 +86,7 @@
         cmd, size, arg1, arg2, arg3 = struct.unpack("iIqqq", binary)
         extra = self._recv_all(size)
         msg = Message(cmd, arg1, arg2, arg3, extra)
-        print 'RECV:', self.pid, msg
+        #print 'RECV:', self.pid, msg
         return msg
 
     def expect(self, cmd, arg1=0, arg2=0, arg3=0, extra=""):
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
@@ -237,15 +237,21 @@
     }
 }
 
+/* keep in sync with 'REVDB_WEAKLINK' in rpython.memory.gctransform.boehm */
+struct WEAKLINK {
+    void *re_addr;
+    long long re_off_prev;
+};
+
 RPY_EXTERN
 void *rpy_reverse_db_weakref_create(void *target)
 {
     /* see comments in ../test/test_weak.py */
-    struct pypy_REVDB_WEAKLINK0 *r;
+    struct WEAKLINK *r;
     if (!RPY_RDB_REPLAY)
-        r = GC_MALLOC_ATOMIC(sizeof(struct pypy_REVDB_WEAKLINK0));
+        r = GC_MALLOC_ATOMIC(sizeof(struct WEAKLINK));
     else
-        r = GC_MALLOC(sizeof(struct pypy_REVDB_WEAKLINK0));
+        r = GC_MALLOC(sizeof(struct WEAKLINK));
 
     if (!r) {
         fprintf(stderr, "out of memory for a weakref\n");
@@ -289,7 +295,7 @@
 RPY_EXTERN
 void *rpy_reverse_db_weakref_deref(void *weakref)
 {
-    struct pypy_REVDB_WEAKLINK0 *r = (struct pypy_REVDB_WEAKLINK0 *)weakref;
+    struct WEAKLINK *r = (struct WEAKLINK *)weakref;
     void *result = r->re_addr;
     if (result && !flag_io_disabled) {
         char alive;
diff --git a/rpython/translator/revdb/test/test_basic.py 
b/rpython/translator/revdb/test/test_basic.py
--- a/rpython/translator/revdb/test/test_basic.py
+++ b/rpython/translator/revdb/test/test_basic.py
@@ -271,6 +271,7 @@
 
 
 class TestDebugCommands(InteractiveTests):
+    expected_stop_points = 3
 
     def setup_class(cls):
         #
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to