Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

warning: GDB: Failed to set controlling terminal: Invalid argument

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?

like image 408
JoelFan Avatar asked Oct 06 '10 03:10

JoelFan


1 Answers

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.

like image 60
zwol Avatar answered Nov 12 '22 03:11

zwol