-#ifdef DBG_CLASS
- let strpath = toString path
- hexDumpMap ("staticmap @ " ++ strpath) staticmap
- hexDumpMap ("fieldmap @ " ++ strpath) fieldmap
- hexDumpMap ("methodmap @ " ++ strpath) methodmap
- hexDumpMap ("interfacemap @ " ++ strpath) immap
-#endif
- printfCp "mbase: 0x%08x\n" mbase
- printfCp "iftable: 0x%08x\n" 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)
+ if mateDEBUG
+ then 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
+ else return ()