Author Topic: ubuntu linux and gdb under C::B  (Read 3198 times)

Offline Kreso

  • Multiple posting newcomer
  • *
  • Posts: 45
ubuntu linux and gdb under C::B
« on: July 22, 2006, 11:27:17 pm »
I've tried the 1.0rc2 release and many other nightly builds but they all suffer from the same problem:

debugger doesn't work -> whenever I set a breakpoint or want to start debugging by stepping into, the debugger runs and exits with status 0. It runs the entire program, but I cant break at any point :(

has anyone encountered this before?

windows builds work fine.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: ubuntu linux and gdb under C::B
« Reply #1 on: July 22, 2006, 11:31:57 pm »
Be sure you're using GDB 6.3-2 and no 5.x. Be sure you're compiling with the flag -g and without -s too.

Offline Kreso

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: ubuntu linux and gdb under C::B
« Reply #2 on: July 22, 2006, 11:46:22 pm »
I have gdb 6.4 from ubuntu repos. should I compile gdb6.3?

Offline Kreso

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: ubuntu linux and gdb under C::B
« Reply #3 on: July 23, 2006, 12:03:06 am »
Be sure you're using GDB 6.3-2 and no 5.x. Be sure you're compiling with the flag -g and without -s too.

and yeah, I'm compiling with only the -g flag, but still, the same problem.

here's the debugger output:

Command-line: /usr/bin/gdb -nx -fullname  -quiet -args Untitled1
Working dir : /home/kreso/Projects/asdasdasdasd/
> set prompt >>>>>>cb_gdb:
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> directory /home/kreso/Projects/asdasdasdasd/
>>>>>>cb_gdb:
> delete breakpoints
>>>>>>cb_gdb:
> start
Breakpoint 1 at 0x80483a4: file src.cpp, line 6.
main () at src.cpp:6
/home/kreso/Projects/asdasdasdasd/src.cpp:6:35:beg:0x80483a4
>>>>>>cb_gdb:
> info program
   Using the running image of child process 5792.
Program stopped at 0x80483a4.
It stopped at a breakpoint that has since been deleted.
Type "info stack" or "info registers" for more information.
>>>>>>cb_gdb:
> cont
drek
Program exited normally.
>>>>>>cb_gdb:
> quit

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: ubuntu linux and gdb under C::B
« Reply #4 on: July 23, 2006, 01:08:22 am »
That looks bad. The program just shouldn't stop there. I couldn't tell you if it's because of GDB 6.4 or not.

It seems someone else was having problems with GDB 6.4 too, got 6.4-r4 and it worked. If you can try another version of GDB please do so.

Offline Kreso

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: ubuntu linux and gdb under C::B
« Reply #5 on: July 23, 2006, 12:07:38 pm »
I installed gdb6.3 from source and the same problem occoured, however, it seems to only happen on the hello world program created by the console wizard. I tried an OGRE wizard and both debuggers work there, so w0000000t :)