[SOLVED] Debugging with GDB, F10 steps into all functions

  • Hello,

    I am debugging my Qt application (Qt 5.1.1, MinGW, Windows) using QtCreator and GDB. I can set breakpoints, and the debugger will correctly pause there. But it seems that pressing F10 will not execute the instruction on the current line, but rather either:

    • jump into it (effectively doing a F11)
    • jump back-and-forth a few lines before entering it

    This is very annoying. Is this the normal behaviour? Or what am I doing wrong?
    Except for that strange behaviour, the debugger produces correct values as it seems.


  • I use gdb, even remote on linux embedded, and I could say F10/11 work just fine! :)

  • Moderators

    Are you using a optimized build?

    Those tend to rearrange instructions which in turn can make your debugger "jump around" instead of going from one line to the next.

  • Thanks a lot Tobias, that was it!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.