warning: GDB: Failed to set controlling terminal: Operation not permitted [duplicate]
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:
- Check for the latest
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