From 26e7de9d09b1b4f044a6dc91647a6ebebcff5494 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Mon, 16 Apr 2012 22:01:41 +0200 Subject: [PATCH] gdb: small howto debug generated code not very convenient yet, but hey, better than nothing! --- Mate/MethodPool.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mate/MethodPool.hs b/Mate/MethodPool.hs index 0d089ca..d7faa88 100644 --- a/Mate/MethodPool.hs +++ b/Mate/MethodPool.hs @@ -84,6 +84,12 @@ compileBB hmap cls name = do printf "disasm:\n" mapM_ (putStrLn . showAtt) disasm + -- UNCOMMENT NEXT LINE FOR GDB FUN + -- _ <- getLine + -- (1) start it with `gdb ./mate' and then `run ' + -- (2) on getLine, press ctrl+c + -- (3) `br *0x'; obtain the address from the disasm above + -- (4) `cont' and press enter return entry -- 2.25.1