let (method, cls, cpidx) = cmap M.! w32_from
case M.lookup method mmap of
Nothing -> do
- printf "getMethodEntry(from 0x%08x): no method found. compile it\n" w32_from
+ printf "getMethodEntry(from 0x%08x): no method \"%s\" found. compile it\n" w32_from (show method)
-- TODO(bernhard): maybe we have to load the class first?
-- (Or better in X86CodeGen?)
let (CMethod _ nt) = (constsPool cls) M.! cpidx
hmap <- parseMethod cls (ntName nt)
+ printMapBB hmap
case hmap of
Just hmap' -> do
entry <- compileBB hmap' cls method
printf "disasm:\n"
mapM_ (putStrLn . showAtt) disasm
+ -- UNCOMMENT NEXT LINE FOR GDB FUN
+ -- _ <- getLine
+ -- (1) start it with `gdb ./mate' and then `run <classfile>'
+ -- (2) on getLine, press ctrl+c
+ -- (3) `br *0x<addr>'; obtain the address from the disasm above
+ -- (4) `cont' and press enter
return entry