Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by to3m on Friday February 26, 2016 @12:11PM
(#11182525)
Last I looked, this only worked for C# (possibly all CLR-based languages...) - but native C/C++ breakpoints were addressed by file and line only.
[ Parent
| on HN ]
Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by KMag on Friday February 26, 2016 @11:06PM
(#11186027)
That's likely because with C#, the debugger can use deoptimization and on-stack replacement to get expressions evaluated in the order they happen in the code, as long as the instruction re-ordering happens only in the bytecode to native code compilation. Even though the debugging symbols just have line numbers, the debugger could potentially regenerate they bytecode to figure out which operations correspond to which expressions.
In C++ optimized builds, you might be jumping back and forth between lines due to the compiler re-ordering instructions, and there isn't an easy way to get back code that's in-order.