[Qt-interest] 答复: 答复: a strange problem about if
jjDaNiMoTh
jjdanimoth at gmail.com
Fri Aug 5 14:36:35 CEST 2011
2011/8/5 Kai Koehne <kai.koehne at nokia.com>:
> I've noticed that sometimes that the 'current' line Qt Creator shows is
> actually one off, and similar things. Things can go also weird when
> you're debugging code that has been heavily optimized by the compiler.
> Try to e.g. print something in the if() statement, I bet it isn't
> executed at all.
I noticed the problem with optimization too, and I'm trying in my
projects to not mix builds (like with and without -g flag), or doing a
complete clean before a debug session (ccache is my friend).
At this point, I don't know if it is a gdb or a QtCreator problem.
What you get if you look into gdb directly?
(gdb executable, then do these simple commands: break file.cpp:lineno,
s for step-into, n for next instruction)
More information about the Qt-interest-old
mailing list