debug: show disasm in intel syntax
authorBernhard Urban <lewurm@gmail.com>
Sun, 2 Sep 2012 09:43:12 +0000 (11:43 +0200)
committerBernhard Urban <lewurm@gmail.com>
Sun, 2 Sep 2012 09:43:12 +0000 (11:43 +0200)
as the codeGen syntax is more like intel syntax ;/

Mate/MethodPool.hs
Mate/X86TrapHandling.hs

index 0b1eae3e6b77d3f98ce57ad0a1e01a4323a660ba..b5a6946483d3bc28c6597ee085f9c9544e68a497 100644 (file)
@@ -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"
index e8695aa1a97b07d93ce15cb0d13a3d3d4f6e5814..5f993a6203304533635681149baa6ed09655d574 100644 (file)
@@ -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])