gdb values optimized out

William Kenyon ghc at abacathoo.org
Sun Aug 4 12:57:20 CEST 2013


Dear GHC devs,

I am having problems using gdb to debug ghci.

> ./inplace/bin/ghc-stage2 --interactive
Segmentation fault (core dumped)
> gdb ./inplace/lib/bin/ghc-stage2 core.1234

Which works fine,
but many variables are <optimized out>.

GhcDebugged=YES is set in my build.mk.

> ./inplace/bin/ghc-stage2 +RTS --info
...
Rts Way = rts_thr_debug
...

> ./inplace/bin/ghc-stage1 +RTS --info
...
Rts Way = rts_debug
...

The debug way should make all C and C-- files be compiled with -O0. Which
should mean that nothing appears <optimized out> in gdb.

What am I missing?

Thanks,

Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130804/f1add727/attachment.htm>


More information about the ghc-devs mailing list