as the codeGen syntax is more like intel syntax ;/
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)
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"
printfJit $ printf "\n\n"
-- UNCOMMENT NEXT LINES FOR GDB FUN
-- if (toString $ methName methodinfo) == "thejavamethodIwant2debug"
let entry = Just (intPtrToPtr (fromIntegral reip), fixme)
let cgconfig = defaultCodeGenConfig { customCodeBuffer = entry }
(_, Right right) <- runCodeGenWithConfig (withDisasm $ patcher reip) () () cgconfig
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])
return $ fst right
withDisasm :: CodeGen e s CPtrdiff -> CodeGen e s (CPtrdiff, [Instruction])