-{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-#include "debug.h"
module Mate.X86TrapHandling (
mateHandler,
register_signal
import Mate.ClassPool
import Mate.X86CodeGen
-#ifdef DBG_JIT
-import Text.Printf
-#endif
import Mate.Debug
import Harpy.X86Disassembler
let entry = Just (intPtrToPtr (fromIntegral reip), fixme)
let cgconfig = defaultCodeGenConfig { customCodeBuffer = entry }
(_, Right right) <- runCodeGenWithConfig (withDisasm $ patcher reip) () () cgconfig
- mapM_ (printfJit "patched: %s\n" . showAtt) $ snd right
+ mapM_ (printfJit . printf "patched: %s\n" . showAtt) $ snd right
return reip
withDisasm :: CodeGen e s CPtrdiff -> CodeGen e s (CPtrdiff, [Instruction])