News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

My C::B's gdb debugger didn't work in ubuntu :(

Started by tigertang, May 14, 2017, 06:11:37 PM

Previous topic - Next topic

tigertang

everytime i tried to set a breakpoint and debug, the terminal told me this:
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1) 7.12.50.20170314-git
Undefined command: "tty".  Try "help".
At /home/***/code/projectCpp/main.cpp:7

unfortuately, pressing f7 at this time...Oops!
It seems that debugger isn't willing to work anymore....
:(
:(
Please help me...
Thank you guys very much!

oBFusCATed

The information you've provided is not enough to understand where the problem lies, so we'll need a bit more.
Can you enable full logging in the settings -> debugger, reproduce the problem and then post the log using code tags or in some pastebin?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]


oBFusCATed

For some reason your gdb doesn't support the tty command

[debug]> tty /dev/pts/0
[debug]Undefined command: "tty".  Try "help".


Why do you use 7.12.50.xxxx? As far as I know these are development snapshots.
Can you try to install 7.12 or 7.12.1?
These are known to work correctly with codeblocks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

lioujheyu

I have the same problem on Ubuntu 17.04 with the same gdb version(7.12.50~).
For unknown reason, tty command is no longer provided by this gdb. But tty command is actually the alias of "set inferior-tty"
(reference:
https://sourceware.org/gdb/onlinedocs/gdb/Input_002fOutput.html).
So my solution to this issue is to replace "tty " with "set inferior-tty " in codeblocks' sorce file: trunk/src/plugins/debuggergdb/debuggergdb.cpp:924.

oBFusCATed

This is an acknowledged bug in this version of gdb.
For some reason this ubuntu ships with a development version of gdb.
This should be fixed in later versions of gdb.

Please ask ubuntu developers to update the gdb package to a release version.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]