warning: GDB: Failed to set controlling terminal: Invalid argument
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.
user1601201
Updated on January 16, 2020Comments
-
user1601201 over 4 years
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 ahello world
program. How can I solve this? -
user1601201 over 13 yearsWhat 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?
-
zwol over 13 yearsI 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.
-
user1601201 over 13 yearsWell, I'm just starting with Qt Creator, but in my little test program with a simple for loop, the debugger seemed to work
-
andref over 13 yearsIt 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.
-
user1601201 over 13 yearsHmmm, can I fix it and submit a patch?