gdb values optimized out

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gdb values optimized out

William Kenyon
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>