[pypy-commit] pypy reverse-debugger: Translation fixes
arigo
pypy.commits at gmail.com
Thu Aug 11 10:15:20 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: reverse-debugger
Changeset: r86140:c4ffe110cd17
Date: 2016-08-11 14:01 +0200
http://bitbucket.org/pypy/pypy/changeset/c4ffe110cd17/
Log: Translation fixes
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
@@ -131,7 +131,8 @@
_RPY_REVDB_UNLOCK();
}
-static void reverse_db_teardown(void)
+RPY_EXTERN
+void rpy_reverse_db_teardown(void)
{
uint64_t stop_points;
if (!RPY_RDB_REPLAY) {
@@ -142,8 +143,8 @@
rpy_reverse_db_fetch(), which has nothing more to fetch now */
rpy_revdb.buf_limit += 1;
}
- _RPY_REVDB_EMIT_L(stop_points = rpy_revdb.stop_point_seen; ,
- uint64_t _e, stop_points, /*must_lock=*/0);
+ _RPY_REVDB_EMIT_L(stop_points = rpy_revdb.stop_point_seen;,
+ uint64_t _e, stop_points);
if (!RPY_RDB_REPLAY) {
rpy_reverse_db_flush();
@@ -523,8 +524,7 @@
else
r->re_off_prev = 1; /* any number > 0 */
- _RPY_REVDB_EMIT_L(alive = WEAKREF_AFTERWARDS_DEAD;, char _e, alive,
- /*must_lock=*/0);
+ _RPY_REVDB_EMIT_L(alive = WEAKREF_AFTERWARDS_DEAD;, char _e, alive);
if (!RPY_RDB_REPLAY) {
_RPY_REVDB_UNLOCK();
@@ -571,8 +571,7 @@
WEAKREF_AFTERWARDS_ALIVE);
r->re_off_prev = recording_offset();
}
- _RPY_REVDB_EMIT_L(alive = WEAKREF_AFTERWARDS_DEAD;, char _e, alive,
- /*must_lock=*/0);
+ _RPY_REVDB_EMIT_L(alive = WEAKREF_AFTERWARDS_DEAD;, char _e, alive);
if (!RPY_RDB_REPLAY) {
_RPY_REVDB_UNLOCK();
@@ -684,7 +683,7 @@
m->entry_point(m->argc, m->argv);
/* main thread finished, program stops */
- reverse_db_teardown();
+ rpy_reverse_db_teardown();
/* unreachable */
abort();
@@ -730,7 +729,7 @@
{
if (!RPY_RDB_REPLAY) {
int exitcode = (int)entry_point(argc, argv);
- reverse_db_teardown();
+ rpy_reverse_db_teardown();
return exitcode;
}
else {
diff --git a/rpython/translator/revdb/src-revdb/revdb_include.h b/rpython/translator/revdb/src-revdb/revdb_include.h
--- a/rpython/translator/revdb/src-revdb/revdb_include.h
+++ b/rpython/translator/revdb/src-revdb/revdb_include.h
@@ -103,17 +103,21 @@
variable = _e; \
}
-#define _RPY_REVDB_EMIT_L(normal_code, decl_e, variable, must_lock) \
+#define _RPY_REVDB_EMIT_L(normal_code, decl_e, variable) \
if (!RPY_RDB_REPLAY) { \
normal_code \
- if (must_lock) _RPY_REVDB_LOCK(); \
_RPY_REVDB_EMIT_RECORD_L(decl_e, variable) \
- if (must_lock) _RPY_REVDB_UNLOCK(); \
} else \
_RPY_REVDB_EMIT_REPLAY(decl_e, variable)
#define RPY_REVDB_EMIT(normal_code, decl_e, variable) \
- _RPY_REVDB_EMIT_L(normal_code, decl_e, variable, 1)
+ if (!RPY_RDB_REPLAY) { \
+ normal_code \
+ _RPY_REVDB_LOCK(); \
+ _RPY_REVDB_EMIT_RECORD_L(decl_e, variable) \
+ _RPY_REVDB_UNLOCK(); \
+ } else \
+ _RPY_REVDB_EMIT_REPLAY(decl_e, variable)
#define RPY_REVDB_EMIT_VOID(normal_code) \
if (!RPY_RDB_REPLAY) { normal_code } else { }
More information about the pypy-commit
mailing list