qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 15/31] target-i386/op_helper.c: use LOG_PCALL/LOG_PC


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

Remaining places where there were debugging #ifdefs and LOG_PCALL and
LOG_PCALL_STATE macros can be used instead.

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

diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index 6c78d2e..6bafa4f 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -2290,13 +2290,8 @@ void helper_lcall_protected(int new_cs, target_ulong 
new_eip,
     target_ulong ssp, old_ssp, next_eip;
 
     next_eip = env->eip + next_eip_addend;
-#ifdef DEBUG_PCALL
-    if (loglevel & CPU_LOG_PCALL) {
-        fprintf(logfile, "lcall %04x:%08x s=%d\n",
-                new_cs, (uint32_t)new_eip, shift);
-        cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP);
-    }
-#endif
+    LOG_PCALL("lcall %04x:%08x s=%d\n", new_cs, (uint32_t)new_eip, shift);
+    LOG_PCALL_STATE(env);
     if ((new_cs & 0xfffc) == 0)
         raise_exception_err(EXCP0D_GPF, 0);
     if (load_segment(&e1, &e2, new_cs) != 0)
@@ -2594,13 +2589,9 @@ static inline void helper_ret_protected(int shift, int 
is_iret, int addend)
         if (is_iret)
             POPW(ssp, sp, sp_mask, new_eflags);
     }
-#ifdef DEBUG_PCALL
-    if (loglevel & CPU_LOG_PCALL) {
-        fprintf(logfile, "lret new %04x:" TARGET_FMT_lx " s=%d addend=0x%x\n",
-                new_cs, new_eip, shift, addend);
-        cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP);
-    }
-#endif
+    LOG_PCALL("lret new %04x:" TARGET_FMT_lx " s=%d addend=0x%x\n",
+              new_cs, new_eip, shift, addend);
+    LOG_PCALL_STATE(env);
     if ((new_cs & 0xfffc) == 0)
         raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc);
     if (load_segment(&e1, &e2, new_cs) != 0)
-- 
1.5.5.GIT





reply via email to

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