how to examine data with compiler optimization option set?

Robert Dewar dewar@adacore.com
Tue Sep 2 21:50:00 GMT 2008


jreiver@free.fr wrote:
> Yes, I knew that the optimization option removes the visibility for a, b and c.
> But GDB user manual seemed to say that you can still view them with providing
> -gstabs or -gdwarf2 option, in addition to the -O[1|2|3] option you might want
> to keep.

It does not say that, it says that "depending on the support for such 
cases offered by the debug format" ... it does not imply or state that
any debug format will be able to preserve the information (in the
general case it is enormously difficult to preserve this information).
> 
> Isn't that possible at all? (I am currently evaluating the debugging facilities
> of gdb)
> 

No it is not possible.



More information about the Gdb mailing list