From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LB9ew-0007nc-L1 for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LB9ep-0007eT-5Z for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:25 -0500 Received: from [199.232.76.173] (port=50395 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB9ep-0007eK-0S for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:23 -0500 Received: from mx20.gnu.org ([199.232.41.8]:34580) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LB9eo-0001fN-He for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:22 -0500 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LB9en-0006A3-EY for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:21 -0500 From: Eduardo Habkost Date: Fri, 12 Dec 2008 13:08:51 -0200 Message-Id: <1229094550-2022-13-git-send-email-ehabkost@redhat.com> In-Reply-To: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> References: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 12/31] target-i386/op_helper.c: LOG_PCALL macro Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost 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 --- 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