On 9/13/2012 12:46 PM, Tom Tromey wrote:
"Robert" == Robert Dewar <de...@adacore.com> writes:

Robert> Sometimes I wonder whether the insistence on -g not changing code
Robert> generation is warranted. In practice, gdb for me is so weak in handling
Robert> -O1 or -O2, that if I want to debug something I have to recompile
Robert> with -O0 -g, which causes quite a bit of code generation change :-)

If those are gdb bugs, please file them.

Well I think everyone knows about the failings of gdb in -O1 mode, they
have been much discussed, and they are not really gdb bugs, more an issue of it being basically hard to debug optimized code. Things used
to be a LOT better, I routinely debugged code at -O1, but then the
compiler got better at optimization, and things deteriorated so much
at -O1 that now I don't even attempt it.

Tom


Reply via email to