[pypy-commit] pypy reverse-debugger: Tweaks

arigo pypy.commits at gmail.com
Mon Jun 27 12:33:57 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: reverse-debugger
Changeset: r85408:71052a487be1
Date: 2016-06-27 18:35 +0200
http://bitbucket.org/pypy/pypy/changeset/71052a487be1/

Log:	Tweaks

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
@@ -21,7 +21,7 @@
 #include "src-revdb/revdb_include.h"
 
 #define RDB_SIGNATURE   "RevDB:"
-#define RDB_VERSION     0x00FF0001
+#define RDB_VERSION     0x00FF0002
 
 #define WEAKREF_AFTERWARDS_DEAD    ((char)0xf2)
 #define WEAKREF_AFTERWARDS_ALIVE   ((char)0xeb)
@@ -58,7 +58,7 @@
     RPY_RDB_REPLAY = replay_asked;
 #else
     if (replay_asked != RPY_RDB_REPLAY) {
-        fprintf(stderr, "This executable was only compiled for %s mode.",
+        fprintf(stderr, "This executable was only compiled for %s mode.\n",
                 RPY_RDB_REPLAY ? "replay" : "record");
         exit(1);
     }
@@ -154,7 +154,14 @@
         h.argc = argc;
         h.argv = argv;
         write_all((const char *)&h, sizeof(h));
+        fprintf(stderr, "PID %d: recording revdb log to '%s'\n",
+                        (int)getpid(), filename);
     }
+    else {
+        fprintf(stderr, "PID %d starting, log file disabled "
+                        "(use PYPYRDB=logfile)\n", (int)getpid());
+    }
+
     rpy_revdb.buf_p = rpy_rev_buffer + sizeof(int16_t);
     rpy_revdb.buf_limit = rpy_rev_buffer + sizeof(rpy_rev_buffer) - 32;
     rpy_revdb.unique_id_seen = 1;
@@ -710,7 +717,7 @@
                 return;
 
             default:
-                fprintf(stderr, "bad packet header %d", (int)header);
+                fprintf(stderr, "bad packet header %d\n", (int)header);
                 exit(1);
             }
         }
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
@@ -22,7 +22,7 @@
         #
         self.cur = 0
         x = self.read1('c'); assert x == '\x00'
-        x = self.read1('P'); assert x == 0x00FF0001
+        x = self.read1('P'); assert x == 0x00FF0002
         x = self.read1('P'); assert x == 0
         x = self.read1('P'); assert x == 0
         self.argc = self.read1('P')


More information about the pypy-commit mailing list