- pokeElemOff (intPtrToPtr $ fromIntegral mbase) 0 w32_iftable
- printfCp "staticmap: %s @ %s\n" (show staticmap) (toString path)
- printfCp "fieldmap: %s @ %s\n" (show fieldmap) (toString path)
- printfCp "methodmap: %s @ %s\n" (show methodmap) (toString path)
- printfCp "mbase: 0x%08x\n" mbase
- printfCp "interfacemethod: %s @ %s\n" (show immap) (toString path)
- printfCp "iftable: 0x%08x\n" w32_iftable
+ pokeElemOff (intPtrToPtr $ fromIntegral mbase) 0 wn_iftable
+ let hexDumpMap :: Integral v => String -> M.Map B.ByteString v -> IO ()
+ hexDumpMap header mmap = do
+ let printValue :: B.ByteString -> IO ()
+ printValue key = printfCp $ printf "\t%-70s: 0x%08x\n" (toString key) val
+ where val = fromIntegral (mmap M.! key) :: NativeWord
+ printfCp $ printf "%s\n" header
+ mapM_ printValue (M.keys mmap)
+ when mateDEBUG $ do
+ let strpath = toString path
+ hexDumpMap ("staticmap @ " ++ strpath) staticmap
+ hexDumpMap ("fieldmap @ " ++ strpath) fieldmap
+ hexDumpMap ("methodmap @ " ++ strpath) methodmap
+ hexDumpMap ("interfacemap @ " ++ strpath) immap
+ printfCp $ printf "mbase: 0x%08x\n" mbase
+ printfCp $ printf "iftable: 0x%08x\n" wn_iftable