Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » gdb crash
gdb crash [message #226516] Fri, 07 November 2008 23:13 Go to next message
Eclipse UserFriend
Originally posted by: noah.roberts.eng-software.com

I'm attempting to use gdb within eclipse on a project linked to wx dll.
Recently I downgraded to gdb 6.6 in order to get rid of it breaking in
ntdll land for no reason (google explained to do this). Now it crashes,
but only within eclipse!

If I run the program from msys, fine..works. If I run the program
within gdb from msys...works fine. If I run the program within gdb from
cmd (windows), it works just fine. If I run the program within gdb from
eclipse I get a SEGFAULT with a backtrace like this:

Thread [1] (Suspended: Signal 'SIGSEGV' received. Description:
Segmentation fault.)
4 <symbol is not available> 0x08458b00
3 __do_global_ctors() e:\wx2.8.9\include\wx-2.8\wx\list.h:511 0x004052bb
2 __mingw_CRTStartup() 0x0040122a
1 WinMainCRTStartup() 0x004012b8


I've tried many different configurations for the debugger settings and
so far nothing has had any effect.

Any ideas?
Re: gdb crash [message #226556 is a reply to message #226516] Mon, 10 November 2008 08:20 Go to previous messageGo to next message
Dmitry Smirnov is currently offline Dmitry SmirnovFriend
Messages: 92
Registered: July 2009
Member
Noah Roberts wrote:

> Thread [1] (Suspended: Signal 'SIGSEGV' received. Description:
> Segmentation fault.)
> 4 <symbol is not available> 0x08458b00
> 3 __do_global_ctors() e:wx2.8.9includewx-2.8wxlist.h:511 0x004052bb
> 2 __mingw_CRTStartup() 0x0040122a
> 1 WinMainCRTStartup() 0x004012b8

> Any ideas?

I recall I'd seen some SIGSEGV in GDB (most likely it was GDB 6.3, but
issue was related to sockets). I was very surprized that program will run
after I resume it. Did you tried to resume?

Dmitry
Re: gdb crash [message #226874 is a reply to message #226556] Mon, 17 November 2008 16:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: noah.roberts.eng-software.com

Dmitry Smirnov wrote:
> Noah Roberts wrote:
>
>> Thread [1] (Suspended: Signal 'SIGSEGV' received. Description:
>> Segmentation fault.)
>> 4 <symbol is not available> 0x08458b00
>> 3 __do_global_ctors() e:wx2.8.9includewx-2.8wxlist.h:511
>> 0x004052bb
>> 2 __mingw_CRTStartup() 0x0040122a
>> 1 WinMainCRTStartup() 0x004012b8
>
>> Any ideas?
>
> I recall I'd seen some SIGSEGV in GDB (most likely it was GDB 6.3, but
> issue was related to sockets). I was very surprized that program will
> run after I resume it. Did you tried to resume?
>
> Dmitry
>

Yep, terminated. I also tried rebooting, etc.
Re: gdb crash [message #226961 is a reply to message #226874] Tue, 18 November 2008 12:21 Go to previous messageGo to next message
Dmitry Smirnov is currently offline Dmitry SmirnovFriend
Messages: 92
Registered: July 2009
Member
This seems to becoming my favorite question :-) but this is the only
method I know for problem localization.

Have you tried to debug the program with console gdb? Please do it from
clean windows command line and from MSYS console.

Debugging a program from console is simple:

> gdb MyProgram.exe
(gdb) run
Re: gdb crash [message #228578 is a reply to message #226961] Sat, 10 January 2009 02:57 Go to previous messageGo to next message
Niraj K Patel is currently offline Niraj K PatelFriend
Messages: 3
Registered: July 2009
Junior Member
Hello, I stumbled on this thread because I have a similar issue and I
followed your recommendation. When I use Eclipse/cdt/gdb I get the
following:

Thread [7] (Suspended: Signal 'SIGSEGV' received. Description:
Segmentation fault.)
5 <symbol is not available> 0x00330030
4 <symbol is not available> 0x07a1ffb4
3 ntdll!RtlSetInformationAcl() 0x7c927b7c
2 ntdll!RtlSetInformationAcl() 0x7c927ac9
1 <symbol is not available> 0x00000000


When I use gdb command line, I do not experience this problem. I am
working on an open source project in Qt and trying to debug a problem.
When a code calls open file dialog box, within a few seconds, this error
occurs and I can't get to the place I need to debug.

Working on:
Eclipse 3.4.1, CDT 5.0.1
MinGW-5.1.3, GNU gdb 6.6
Qt 4.3.1
Windows XP SP3

Any ideas???

Thanks,
Niraj
Re: gdb crash [message #228909 is a reply to message #228578] Mon, 19 January 2009 06:23 Go to previous messageGo to next message
Dmitry Smirnov is currently offline Dmitry SmirnovFriend
Messages: 92
Registered: July 2009
Member
Niraj K Patel wrote:

> Any ideas???

Well, I do not know what to say.
Recently I also encountered similar issue: after some changes related to
threads/windows, my program has started to crash with SIGSEGV (when
debuggibg from CDT).
Command-line gdb does not report this exception, program is running
correctly. Program is not crashing if it is just running alone (i.e. not
attached to debugger).

I had found the workaround: if I set a breakpoint at the function that
causes a crash (in my case this is PeekMessage) and step over this
function, everything works fine. I even can disable this breakpoint after
first fit, nothing crashes...

Dmitry
Re: gdb crash [message #228947 is a reply to message #228909] Mon, 19 January 2009 22:31 Go to previous messageGo to next message
Niraj K Patel is currently offline Niraj K PatelFriend
Messages: 3
Registered: July 2009
Junior Member
Dmitry Smirnov wrote:


> I had found the workaround: if I set a breakpoint at the function that
> causes a crash (in my case this is PeekMessage) and step over this
> function, everything works fine. I even can disable this breakpoint after
> first fit, nothing crashes...

> Dmitry

Dmitry, I can't seem to get the stack information to tell me what's
causing the crash. I am linking it to debugged version of Qt library and
my code is has debug turned on, but it doesn't work. Looks like I'll have
to keep working with other alternatives. I am going to try Windows
version of DDD.

Niraj
Re: gdb crash [message #229070 is a reply to message #228947] Tue, 20 January 2009 16:16 Go to previous message
Dmitry Smirnov is currently offline Dmitry SmirnovFriend
Messages: 92
Registered: July 2009
Member
Frontends like DDD (or Eclipse) are using GDB as a backend. I doubt you
will get any additional info. But it is more convinient for debug from UI
perspective, of course
Previous Topic:Code completion, popup window & mouse pointer position
Next Topic:Programmatically formatting C++ code
Goto Forum:
  


Current Time: Tue Apr 16 20:31:42 GMT 2024

Powered by FUDForum. Page generated in 3.24902 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top