how to debug varnish without compiler optimization

彭伟 pwlazy at gmail.com
Wed May 23 17:42:37 CEST 2012


hi

when i debug varnish source code with gdb, i found  some variables showing "
*value optimized out"*
*
*
i think it should compiler optimization,and i found CFlags = " -g -O2 " in
Makefile.

so i recompiled the source code:

export CFLAGS=" -g  -O0 " && ./configure && make && make install

i check the CFlags in Makefile and found it was  CFlags = " -g -O0 ", it
seems the compilation should be success

then i debug the source code again and found those variables still showing "
*value optimized out"*
*
*
it seems strange, how to solve it?  thanks for you answer!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120523/44fec73f/attachment.html>


More information about the varnish-misc mailing list