[quote author="andrep" date="1395863242"]Maybe related (and indicating this is not a Qt Creator problem) : https://sourceware.org/ml/gdb-patches/2014-03/msg00621.html[/quote]
I've actually got a bit more data on this (posted it "here":http://stackoverflow.com/questions/15550265/qt-creator-gdb-debugging-session-ends-unexpectedly), namely:
bq. The second thread is created to load my app's executable and the DLLs it requires. I've confirmed this second thread is created only when I debug my app from the Qt Creator IDE; if I run it from the IDE (i.e., use "run" instead of "debug"), or if I debug it from the command line (launch gdb from the command line), or if I run it from the command line, this second thread is never created, and the executable + DLL images are loaded by my app's main (and only) thread. On what I called "success cases" above, i.e., when this second thread exits, it exits immediately after loading the last DLL, which is why I believe this second thread is created only for this loading.
Whatever is going on here, it still happens with Qt Creator 2.8.1.
The reason why I think this is related to Qt Creator is that this second thread isn't spawned when I launch a debug session with dbg from the command line, only when I debug from the IDE.