Author Topic: gdb problem  (Read 5765 times)

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
gdb problem
« on: May 15, 2008, 11:15:30 am »
Hi!

Iam using GNU gdb 6.5. Most of the time my gdb crash and i have to kill it from terminal. I read through many thread and comments and i found the problem isnt in CB but gdb. What gdb version i should use to avoid these crashes?

Szurilo

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: gdb problem
« Reply #1 on: May 15, 2008, 11:22:21 am »
On Windows the best you can do is using GDB version 6.6.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: gdb problem
« Reply #2 on: May 15, 2008, 11:50:32 am »
Sorry for not describing my system parameters. I use Linux Debian, with CB nightly 5045(by Jens), wxWidgets 2.8.7 and GBU gdb 6.5.
I tried other gdb versions without success.
Szurilo

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: gdb problem
« Reply #3 on: May 15, 2008, 12:31:06 pm »
Which debian suite do you use ?

I don't find gdb 6.5 in any of the standard releases (except from sid for i386hurd):

In etch/stable it should be 6.4.90 and in lennny/testing 6.7.1-2
I have sid/unstable and there aren't any problems (gdb 6.8 ).

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: gdb problem
« Reply #4 on: May 15, 2008, 12:44:01 pm »
I downloaded the 6.5 from http://ftp.gnu.org/gnu/gdb/
As far as i remember i used the 6.4.90 from etch/stable but that's also had this bug. Actually i tried a lot of version of gdb and i remember some was good but i am too tired and busy to pick a random version and try it again.
Now i am installing 6.8.
Szurilo

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: gdb problem
« Reply #5 on: May 15, 2008, 02:28:43 pm »
I installed gdb 6.8, nothing changed. Sometimes gdb freeze before i reach any of the breakpoint, sometimes works perfectly. I am really confused about this. Am i do something wrong? Pls, someone help. I can't debug.
Szurilo

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: gdb problem
« Reply #6 on: May 15, 2008, 03:28:06 pm »
I can't debug.
I'm not the Linux guru here, but what about quickly installing a working distribution (Ubuntu) and using C::B there? I installed Ubuntu and C::B in a VM within ~2-3 hours. So it can be done quite quickly and you can continue working.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: gdb problem
« Reply #7 on: May 15, 2008, 03:41:13 pm »
What does the debugger's debug-log say ?

Check "Settings -> Compiler and debugger... -> Debugger settings -> Display debugger's log".

Have you tried to start "gdb" from command-line to run your project ?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: gdb problem
« Reply #8 on: May 15, 2008, 06:52:33 pm »
On Windows the best you can do is using GDB version 6.6.

well GDB 6.8-3 :-)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: gdb problem
« Reply #9 on: May 16, 2008, 06:39:08 am »
well GDB 6.8-3 :-)
Obviously you never tried, right? Starting from GDB 6.7.50.xxx all releases of GDB just crash if you try to debug a wx application - try with C::B for example! ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: gdb problem
« Reply #10 on: May 16, 2008, 02:16:07 pm »
GDB freezed, i had to kill it from a terminal, debug process couldn't stopped.
Debug log by GNU gdb 6.8 under Linux Debian, CB nightly 5045:

LD_LIBRARY_PATH=.:/home/szurilo/SRC3000/lib:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args bin/Debug/SRC3000
Working dir : /home/szurilo/SRC3000/
(gdb)
> set prompt >>>>>>cb_gdb:
>>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-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 intel
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined.
>>>>>>cb_gdb:
> directory /home/szurilo/SRC3000/
>>>>>>cb_gdb:
> break "/home/szurilo/SRC3000/src/WorkerThread.cpp:237"
Breakpoint 1 at 0x8067ad9: file /home/szurilo/SRC3000/src/WorkerThread.cpp, line 237.
>>>>>>cb_gdb:
> run
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread 0xb678a6c0 (LWP 3831)]
(SRC3000:3831): Gtk-CRITICAL **: gtk_window_set_icon_list: assertion `GTK_IS_WINDOW (window)' failed
[New Thread 0xb6410bb0 (LWP 3834)]
[New Thread 0xb5c0fbb0 (LWP 3835)]
[Thread 0xb5c0fbb0 (LWP 3835) exited]
[New Thread 0xb540ebb0 (LWP 3836)]
[Thread 0xb540ebb0 (LWP 3836) exited]
(SRC3000:3831): Gtk-CRITICAL **: gtk_file_system_unix_get_folder: assertion `g_path_is_absolute (filename)' failed
[Switching to Thread 0xb6410bb0 (LWP 3834)]
Breakpoint 1, WorkerThread::Entry (this=0x82ad278) at /home/szurilo/SRC3000/src/WorkerThread.cpp:237
/home/szurilo/SRC3000/src/WorkerThread.cpp:237:7130:beg:0x8067ad9
>>>>>>cb_gdb:
> info locals
event = <incomplete type>
>>>>>>cb_gdb:
> info args
this = (WorkerThread * const) 0x82ad278
>>>>>>cb_gdb:
> whatis freqfifolist.back()
type = CFrBase *&
>>>>>>cb_gdb:
> output freqfifolist.back()
(CFrBase *&) @0x1fc: <error reading variable>>>>>>>cb_gdb:
> next

I tried to run gdb from command line, it works, but this is very uncomfortable for me.
Szurilo

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: gdb problem
« Reply #11 on: May 16, 2008, 03:33:46 pm »
I just attach a CB debug bug report, to strengthen i am not talking to the wind.
Of course the next step will be a CB, wx, gdb, reinstall if nobody can help me. :(

Szurilo

[attachment deleted by admin]