Debugging the RTS

Erik de Castro Lopo mle+hs at mega-nerd.com
Thu May 14 08:36:04 UTC 2015


Hi all,

I'm trying to debug a AArch64/Linux specific RTS issue and digging
around in the rts C code, I see a large amount of code wrapped in
"#if DEBUG" type statements, but no way to enable in either
mk/build.mk or it seems in any of the other build related settings
files in the mk/ directory.

The only way I have found to enable this debug code that actually
works is to enable this DEBUG code is to edit mk/ghc.mk as follows:

    -STANDARD_OPTS += -DCOMPILING_RTS
    +STANDARD_OPTS += -DCOMPILING_RTS -DDEBUG

However, once I do that I get a bunch of C synatx errors.

I am doing this wrong or has the DEBUG code bit rotted?

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the ghc-devs mailing list