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-0007nb-FU for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LB9en-0007bK-AK for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:22 -0500 Received: from [199.232.76.173] (port=50380 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB9en-0007b3-2e for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:21 -0500 Received: from mx2.redhat.com ([66.187.237.31]:32980) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LB9el-0001eP-OT for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:20 -0500 From: Eduardo Habkost Date: Fri, 12 Dec 2008 13:08:48 -0200 Message-Id: <1229094550-2022-10-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 09/31] kqemu.c: LOG_INT_STATE 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 --- kqemu.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/kqemu.c b/kqemu.c index 0185195..25f24c1 100644 --- a/kqemu.c +++ b/kqemu.c @@ -53,8 +53,14 @@ if (loglevel & CPU_LOG_INT) \ fprintf(logfile, ## __VA_ARGS__); \ } while (0) +# define LOG_INT_STATE(env) \ + do { \ + if (loglevel & CPU_LOG_INT) \ + cpu_dump_state(env, logfile, fprintf, 0); \ + } while (0) #else # define LOG_INT(...) do { } while (0) +# define LOG_INT_STATE(env) do { } while (0) #endif #include -- 1.5.5.GIT