Re: How to solve gdb <value optimized out> problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> I am trying debug gcc 4.5.0 use gdb on ubuntu
>
> and encounter the problem by seeing "value optimized out".  as fellow:
>
> (gdb) run -I /usr/include /cazy/add.c
> Starting program: /home/cazy/gcc-object/gcc/cc1 -I /usr/include
> /cazy/add.c
> Breakpoint 4, c_parser_declaration_or_fndef (parser=0xb7f32bb4,
>     fndef_ok=1 '\001', empty_ok=1 '\001', nested=0 '\000',
>     start_attr_ok=1 '\001') at ../../project/gcc-4.5.0/gcc/c-parser.c:1170
> 1170 {
> (gdb) next
> 1175   location_t here = c_parser_peek_token (parser)->location;
> (gdb) next
> 1170 {
> (gdb) p here
> $5 = <value optimized out>
>
>
> This creates a lot of problem for me to debuging
> So, I am wondering if there is anyway to solve the problem?
>
> thanks
> cazy
> --
> View this message in context:
> http://old.nabble.com/How-to-solve-gdb-%3Cvalue-optimized-out%3E-problem--tp28693805p28693805.html
> Sent from the gcc - Help mailing list archive at Nabble.com.
>
>

Are you using the -O flag? If so, don't or set it to 0.

Cheers,
Mark




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux