User forums > Help
Irritating error message when debugging in XTerm
Napoleon:
Using Code::Blocks 13.12, when I run my project in debug mode, using XTerm by default, I always get the following error:
--- Quote ---"warning: GDB: Failed to set controlling terminal: Operation not permitted"
--- End quote ---
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:
--- Quote ----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.
--- End quote ---
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
oBFusCATed:
Why do you think this is an error?
As far as I can read it says it is a warning :)
Are you able to debug your program?
killerbot:
--- Quote ---I've never had a problem debugging my code, but would like to make this error go away.
--- End quote ---
Just a valid request to get rid of this annoying message. It gives the FALSE impression that something might be wrong.
oBFusCATed:
Then someone should fix GDB... as far as I know we could not do anything about it.
Napoleon:
@KillerBot, thnx.
@oBFusCATed; Sorry for using the word ERROR when I should have used WARNING. However my intention remains, I would like to make it go away.
Everyone is pointing to GDB, but the -e parameter in XTERM is expecting a program name and arguments to follow, which don't seem to be supplied by the default launch command, unless Code::Blocks appends them automatically somehow in during the launch sequence.
From a gnome-terminal, typing:
--- Code: --- xterm -e "/usr/bin/gdb -quiet /home/user/Documents/3420ICT/assignments/a1/bin/Release/a1"
--- End code ---
opens XTerm, launches the GDB in quiet mode, gives me a message "Reading symbols from ...", loads my program, prints another message ".done." and gives me the (gdb) prompt. No Warnings.
This suggests to me that perhaps there needs to be something after the -e in the Settings->Environment->General->Terminal launch command field.
Cheers,
Nap
Navigation
[0] Message Index
[#] Next page
Go to full version