Author Topic: My C::B's gdb debugger didn't work in ubuntu :(  (Read 3828 times)

Offline tigertang

  • Single posting newcomer
  • *
  • Posts: 2
My C::B's gdb debugger didn't work in ubuntu :(
« on: May 14, 2017, 06:11:37 pm »
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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: My C::B's gdb debugger didn't work in ubuntu :(
« Reply #1 on: May 14, 2017, 11:14:59 pm »
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!]

Offline tigertang

  • Single posting newcomer
  • *
  • Posts: 2
Re: My C::B's gdb debugger didn't work in ubuntu :(
« Reply #2 on: May 15, 2017, 12:15:08 pm »
Does this gives enough information? :o
https://pastebin.com/bMuM5ZUQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: My C::B's gdb debugger didn't work in ubuntu :(
« Reply #3 on: May 15, 2017, 07:50:01 pm »
For some reason your gdb doesn't support the tty command
Code
[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

  • Guest
Re: My C::B's gdb debugger didn't work in ubuntu :(
« Reply #4 on: August 08, 2017, 02:11:58 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: My C::B's gdb debugger didn't work in ubuntu :(
« Reply #5 on: August 08, 2017, 09:09:51 am »
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!]