> Short of putting a barrier at every sequence point, how would you stop > the debugger from jumping all over the place? I'm assuming that you > do want the debugger to show what is actually going on, not fake it.
You could, for example, add a -Og option that says "don't do any optimizations that will move instructions between lines".