I'm using Code-Blocks IDE in my Ubuntu 12.10.But when I'm trying to debug any project, I got the following warning:
warning: GDB: Failed to set controlling terminal: Operation not permitted
What should I do now ?
I'm using Code-Blocks IDE in my Ubuntu 12.10.But when I'm trying to debug any project, I got the following warning:
warning: GDB: Failed to set controlling terminal: Operation not permitted
What should I do now ?
I had a similar problem on Ubuntu 16.04 using GDB 7.11 via XTerm. To solve it I simply modified the permissions on the local .gdbinit file by issuing chmod +x /path/to/file/.gdbinit
which resolved the issue.
Install or verify that gnome terminal is installed on your PC
Switch to gnome-terminal
. under Settings -> Environment -> Terminal to launch, I use this:
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
You will still get the error but the debugger works completely.
I had the same Problem with Ubuntu 10.04, QTCreator 2.5.2 and gdb 7.1 coming with ubuntu.
I could solve my problems with an upgrade to the current version 7.5 of gdb and using this instead the 7.1 installed by ubuntu.
You can download the latest and compile it by yourself:
gdb-*.tar.gz
file here, and adapt the commands below if necessary.wget http://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.gz
tar xvfz gdb-7.6.2.tar.gz
cd gdb-7.6.2
./configure
make
cp gdb/gdb /usr/local/bin
Take care about that the /usr/local/bin
is at the beginning of the PATH you are using while running QtCreator.
You can place the following line into your .profile
:
export PATH=$PATH:/usr/local/bin
I had the same problem using KDBG on Debian jessie to debug assembling program but it was only because I didn't have the right to execute the file (copy)
a simple chmod +x /path/to/file
solved the problem
ioctl(TIOCSCTTY)
and failing because the terminal is already controlling another session.
– user133831
Dec 04 '20 at 21:50
Had the same problem using Debug in kdevelop with my C code. Disdabled the "Use External Terminal" option under Run/Configure Launches and it works like a charm.