Using Code::Blocks 13.12, when I run my project in debug mode, using XTerm by default, I always get the following error:
"warning: GDB: Failed to set controlling terminal: Operation not permitted"
I've never had a problem debugging my code, but would like to make this error go away.
So, I've looked around for an answer explaining how to fix this problem but haven't found a solution. Only references to bugs in GDB, and that the same bug appears for NetBean users.
Removing the -e option in
Settings->Environment->General->Terminal launch command causes XTerm to not display. In fact I get a message in the Debugger Log saying
Can't launch console (xterm -T 'Program Console' sleep 80002690).
So I had a look at the
XTerm Manual for an explanation of the
-e option, see below:
-e program [ arguments ... ]
This option specifies the program (and its command line arguments) to be run in the xterm window. It also sets the window title and icon name to be the basename of the program being executed if neither -T nor -n are given on the command line. This must be the last option on the command line.
The default launch command does not specify what the program and arguments are. So I would like to put those parameters in. However I cannot find which CodeBlocks predefined variables to use. I've been considering using:
$(TARGET_NAME), but that is the build target, which I'm not sure is the same as the debugging target, and
I cannot find the variable that holds the "program arguments".
Can anyone help?
Cheers,
Nap