Mail Archives: djgpp/1999/11/15/06:13:29
On Sun, 14 Nov 1999, Adam Schrotenboer wrote:
> Also, turn off optimizations, compile w/ -O0 as last argument.
I would advise against turning off optimizations when debugging. The
reason for this is that the code generated by GCC without
optimizations is VERY different from the optimized code (also about 2
times slower). So you are in effect debugging a different program.
Many bugs don't raise their ugly head until you recompile with
optimizations. If you do that just before shipping your program, or
just before using it for production runs, you'd be in trouble.
I suggest to debug optimized programs. Just be prepared to see the
execution thread jump a little bit out of order. In my experience, it
never gets in the way of debugging.
- Raw text -