This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to solve gdb <value optimized out> problem?
- From: "Andi Hellmund" <mail at andihellmund dot com>
- To: "cazy" <ad319min at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 27 May 2010 18:03:54 +0200
- Subject: Re: How to solve gdb <value optimized out> problem?
- References: <28693805.post@talk.nabble.com>
- Reply-to: mail at andihellmund dot com
Hey,
> I am trying debug gcc 4.5.0 use gdb on ubuntu
>
> and encounter the problem by seeing "value optimized out". as fellow:
Did you get this behavior even with the -O0 GCC build? Basically, GDB
tells you what's wrong with the executable. For a short explanation, check
this page (http://www.cs.utk.edu/~vose/c-stuff/onlinedocs/gdb_7.html) and
search for "value optimized out".
I made the experience that using -O0 shouldn't produce the "value
optimized out" problem, because the code is not optimized.
Andi