From: Bernhard Urban Date: Fri, 17 Aug 2012 17:21:45 +0000 (+0200) Subject: debug: ifdef this, because ghc doesn't eliminate this :/ X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mate.git;a=commitdiff_plain;h=62940aeb3ccd1dc9d6a24eac1449a90a2f69c601 debug: ifdef this, because ghc doesn't eliminate this :/ --- diff --git a/Mate/MethodPool.hs b/Mate/MethodPool.hs index 0b11d3d..c8cb084 100644 --- a/Mate/MethodPool.hs +++ b/Mate/MethodPool.hs @@ -18,7 +18,9 @@ import Foreign.C.String import JVM.ClassFile import Harpy +#ifdef DBG_JIT import Harpy.X86Disassembler +#endif #ifdef DEBUG import Text.Printf @@ -141,7 +143,9 @@ compileBB rawmethod methodinfo = do printfJit "generated code of \"%s\" from \"%s\":\n" (toString $ methName methodinfo) (toString $ methClassName methodinfo) printfJit "\tstacksize: 0x%04x, locals: 0x%04x\n" (rawStackSize rawmethod) (rawLocals rawmethod) +#ifdef DBG_JIT mapM_ (printfJit "%s\n" . showAtt) (snd right) +#endif printfJit "\n\n" -- UNCOMMENT NEXT LINES FOR GDB FUN -- if (toString $ methName methodinfo) == "thejavamethodIwant2debug"