From 60297de17a166656519429b9652c0cf059e900f1 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Sun, 2 Sep 2012 11:43:12 +0200 Subject: [PATCH] debug: show disasm in intel syntax as the codeGen syntax is more like intel syntax ;/ --- Mate/MethodPool.hs | 2 +- Mate/X86TrapHandling.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mate/MethodPool.hs b/Mate/MethodPool.hs index 0b1eae3..b5a6946 100644 --- a/Mate/MethodPool.hs +++ b/Mate/MethodPool.hs @@ -146,7 +146,7 @@ compileBB rawmethod methodinfo = do printfJit $ printf "generated code of \"%s\" from \"%s\":\n" (toString $ methName methodinfo) (toString $ methClassName methodinfo) printfJit $ printf "\tstacksize: 0x%04x, locals: 0x%04x\n" (rawStackSize rawmethod) (rawLocals rawmethod) - when mateDEBUG $ mapM_ (printfJit . printf "%s\n" . showAtt) (snd right) + when mateDEBUG $ mapM_ (printfJit . printf "%s\n" . showIntel) (snd right) printfJit $ printf "\n\n" -- UNCOMMENT NEXT LINES FOR GDB FUN -- if (toString $ methName methodinfo) == "thejavamethodIwant2debug" diff --git a/Mate/X86TrapHandling.hs b/Mate/X86TrapHandling.hs index e8695aa..5f993a6 100644 --- a/Mate/X86TrapHandling.hs +++ b/Mate/X86TrapHandling.hs @@ -67,7 +67,7 @@ patchWithHarpy patcher reip = do let entry = Just (intPtrToPtr (fromIntegral reip), fixme) let cgconfig = defaultCodeGenConfig { customCodeBuffer = entry } (_, Right right) <- runCodeGenWithConfig (withDisasm $ patcher reip) () () cgconfig - when mateDEBUG $ mapM_ (printfJit . printf "patched: %s\n" . showAtt) $ snd right + when mateDEBUG $ mapM_ (printfJit . printf "patched: %s\n" . showIntel) $ snd right return $ fst right withDisasm :: CodeGen e s CPtrdiff -> CodeGen e s (CPtrdiff, [Instruction]) -- 2.25.1