[Python-Dev] what environment variable should contain compiler warning suppression flags?
Stephen J. Turnbull
stephen at xemacs.org
Wed Jun 30 04:55:02 CEST 2010
Steve Holden writes:
> I agree - trying to step through -O2 optimized code isn't going to
> help debug your code, it's going to help you debug the
> optimizer. That's a very rare use case.
Not really. I don't have a lot of practice in debugging at that
level, so take it with a grain of salt, but what I've found with
XEmacs code is that debugging at -O0 is less often helpful than
debugging at -O2. Quite often a naive compilation strategy is used
which basically turns those C statements into macros for the
underlying assembler, and the code works the way the author thinks it
should. But his assumptions are invalid, and when optimized it fails.
So I guess you can call that "debugging the optimizer" if you like....
More information about the Python-Dev
mailing list