qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/31] target-i386/op_helper.c: LOG_PCALL macro


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 12/31] target-i386/op_helper.c: LOG_PCALL macro
Date: Fri, 12 Dec 2008 13:08:51 -0200

This macro will avoid some #ifdefs in the code and create a single point
where the logging call can be changed in the future.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 target-i386/op_helper.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index d32a6a3..7c38d9c 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -23,6 +23,17 @@
 
 //#define DEBUG_PCALL
 
+
+#ifdef DEBUG_PCALL
+#  define LOG_PCALL(...) do {            \
+     if (loglevel & CPU_LOG_PCALL)       \
+       fprintf(logfile, ## __VA_ARGS__); \
+   } while (0)
+#else
+#  define LOG_PCALL(...) do { } while (0)
+#endif
+
+
 #if 0
 #define raise_exception_err(a, b)\
 do {\
-- 
1.5.5.GIT





reply via email to

[Prev in Thread] Current Thread [Next in Thread]