views:

66

answers:

1

I'm using Qt Creator on Ubuntu to develop C. Whenever I run with the debugger, I get the message warning: GDB: Failed to set controlling terminal: Invalid argument. This happens even with a hello world program. How can I solve this?

+1  A: 

This is a bug in Qt Creator, which is not invoking GDB correctly (either inside a pseudoterminal, or with command line arguments that tell it not to expect to be run inside a pseudoterminal). It is also a bug in GDB, which could figure out for itself that it wasn't being run inside a pseudoterminal and behave accordingly. I suspect the GDB maintainers will take the position that this is Qt Creator's fault, and vice versa, alas.

There is a claimed workaround here: http://www.qtforum.org/article/31905/debugging-qt-application-on-linux.html but it sounds kinda dodgy to me.

Zack
What are the consequences of this bug, besides the warning message? Any chance of checking if it's fixed in source control (in either project) so I could build it?
JoelFan
I dunno! My diagnosis is *entirely* based on what you wrote + what I found typing "qt creator gdb controlling terminal" into Google. Some people seem to think it makes the debugger not work, but if the debugger works for you, I think it should be harmless.
Zack
Well, I'm just starting with Qt Creator, but in my little test program with a simple *for* loop, the debugger seemed to work
JoelFan
It is of no consequence. We get this all the time and debugging works without a hitch. It's just a minor annoyance, which might explain why it remains unfixed since version 1.3.
andref
Hmmm, can I fix it and submit a patch?
JoelFan