Author Topic: GDB Compatibility Issues?  (Read 4737 times)

Offline wd40bomber7

  • Single posting newcomer
  • *
  • Posts: 4
GDB Compatibility Issues?
« on: June 20, 2012, 05:32:57 pm »
Code::Blocks doesn't seem to be working with GDB. No idea why.
I have noticed the following issues:

Breakpoints never hit
clicking the i->loaded libraries  opens a dialog saying "Undefined info command: "dll".  Try "help info"."
console says "warning: GDB: Failed to set controlling terminal: Operation not permitted" however the console still appears to function.

I am using the latest version of Ubuntu for Desktops.

Also yes I'm using the debug compile, and it already has the -g option and non of the optimization options as far as I can tell.

Output from a debug session looks like this:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /home/apopelar/Documents/Code::Blocks/AutomaticAntenna/
Adding source dir: /home/apopelar/Documents/Code::Blocks/AutomaticAntenna/
Adding file: bin/Debug/AutomaticAntenna
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Child process PID: 4878
Program received signal SIGINT, Interrupt.
In __kernel_vsyscall () ()
Debugger finished with status 0

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12090
    • Travis build status
Re: GDB Compatibility Issues?
« Reply #1 on: June 20, 2012, 06:06:16 pm »
What C::B are you using? If it is not the latest nightly please try it. See the nightlies sub-forum for details.

Also please verify that running gdb from terminal works correctly.

Last thing: Rename your project's folder and remove the ::, they will mess the debugging, I guarantee that :)
« Last Edit: June 20, 2012, 06:07:47 pm by oBFusCATed »
(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 wd40bomber7

  • Single posting newcomer
  • *
  • Posts: 4
Re: GDB Compatibility Issues?
« Reply #2 on: June 20, 2012, 08:06:07 pm »
How could I use the latest nightly build if they don't release it for linux? All of the nightly builds I look at say
Linux:
none

Also yes, gdb works like a charm by itself. It's just dumb I can't used Code::Blocks.

Yes, I tried removing "::" that has no effect.

New information: I made the discovery that adding breakpoints works as long as its on the original main thread. I haven't the slightest clue why, but it won't hit breakpoints if they're running on a different thread. gdb by itself still works perfectly fine.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12090
    • Travis build status
Re: GDB Compatibility Issues?
« Reply #3 on: June 20, 2012, 08:52:39 pm »
Read the topic about the latest nightly, there is information in it how to install a nightly in ubuntu.
(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 wd40bomber7

  • Single posting newcomer
  • *
  • Posts: 4
Re: GDB Compatibility Issues?
« Reply #4 on: June 20, 2012, 09:46:28 pm »
You mean this topic stickied at the top of the Nightly Build Section?
 http://forums.codeblocks.org/index.php/topic,3232.0.html
Doesn't mention linux/ubuntu

Or the latest nightly build?
http://forums.codeblocks.org/index.php/topic,16412.0.html
Just says Linux: none
Also someone mentions that they tried to compile it on linux, but I don't know where they got the source since the source provided is listed for windows explicitly.

Or this wiki article?
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu
It says to go to the nightly builds and get the tarball, which as I've mentioned isn't there.

Or this wiki article?
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
It says to check the code out of the SVN http://www.codeblocks.org/downloads/7 which just gives a "connection refused" error when I try to do that
It also gives the option of downloading the source in tarball form, but its a very old tarball.

So, if you weren't talking about any of that, what were you talking about?

I'm sure the answer is obvious, but hopefully you can see my frustration as I looked for it.
« Last Edit: June 20, 2012, 09:49:26 pm by wd40bomber7 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12090
    • Travis build status
Re: GDB Compatibility Issues?
« Reply #5 on: June 20, 2012, 09:54:18 pm »
What about this: http://forums.codeblocks.org/index.php/topic,16466.msg111731.html#msg111731

@jens: Is it possible to put a sticky topic describing how to install your nightlies?

p.s. http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu see at the bottom in the "See also" section.
« Last Edit: June 20, 2012, 09:56:23 pm by oBFusCATed »
(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 wd40bomber7

  • Single posting newcomer
  • *
  • Posts: 4
Re: GDB Compatibility Issues?
« Reply #6 on: June 20, 2012, 10:38:54 pm »
Ok awesome! Everything works as I hoped now. The debugger seems to work properly and even has more of its features exposed now.

I wish I saw that guy's post before hand. Its kind of lame that there isn't an official release but it's ok. He's doing everyone a favor by hosting that repository!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12090
    • Travis build status
Re: GDB Compatibility Issues?
« Reply #7 on: June 21, 2012, 12:50:12 am »
If you look below his nick name you can see that he is a developer of C::B :)
(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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: GDB Compatibility Issues?
« Reply #8 on: June 21, 2012, 06:20:52 am »
Our official debian-release is also done by me, in the same chroot (except some updates in the meantime of course).
The cause why I call it (un-)official, is because I host and build it on my own server, because it's much easier  than building it locally and uploading it to another server.
And debians native update-mechanism can be used, if I do so, because I can use a "real" repo.