gcc bug with -ggdb?

Have a question about our Software Developer Kit? Ask them here.

gcc bug with -ggdb?

Postby Raziel » Fri Sep 16, 2011 1:33 pm

gcc (GCC) 4.2.4 (adtools build 20090118)

I have a *very* strange behaviour with one of my ports.
The default setting when building a non-release is to have "-g" set in configure.

With this setting the project crashes at the same point reproduceable but without giving any useful debug info
(it keeps telling me that libstdc++.so crashed, but it doubt that and the program addresses differ randomly)
like so...
Hidden Text - Click to Show :
Symbol info:
Instruction pointer 0x7EAB8714 belongs to module "libstdc++.so" (PowerPC)
Symbol: ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE + 0x78 in section 10 offset 0x00076714

Stack trace:
libstdc++.so:_ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE()+0x78 (section 10 @ 0x76714)
libstdc++.so:__dynamic_cast()+0x84 (section 10 @ 0x771b4)

So i went on looking and eventually tried to get more info through gdb with adding -ggdb and -gstabs to configure and what you say it worked...no more crash at that specific point, the program worked and also doesn't crash later in the process.

I tried more and now have a little list of circumstances that make it crash and work.

-g (crash)
-ggdb (crash)
-gstabs (NO crash)
-ggdb -gstabs (NO crash)
no debug flags at all (NO crash)

Does that give anyone a hint on where i could look next, or is this a bug already taken care of (i know there is an unrealeased 4.4.4 of gcc ) or has anyone another idea on what i could try to corner that?

Please?

Thank you very much for your time
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 864
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: gcc bug with -ggdb?

Postby Trev » Sat Sep 17, 2011 8:42 pm

This looks similar to the issue reported in these threads:

viewtopic.php?f=27&t=71
http://amigans.net/index.php?function=v ... readid=147

But I can't tell without more information. I've never heard from anyone regarding a fix.
Trev
 
Posts: 5
Joined: Sat Jun 18, 2011 6:48 pm

Re: gcc bug with -ggdb?

Postby Raziel » Sun Sep 18, 2011 9:00 am

Trev wrote:This looks similar to the issue reported in these threads:

viewtopic.php?f=27&t=71
http://amigans.net/index.php?function=v ... readid=147

But I can't tell without more information. I've never heard from anyone regarding a fix.


Seems like it could be :-)

Thanks for pointing me to those threads

Heres hoping there'll be a fix someday :-)
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 864
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: gcc bug with -ggdb?

Postby ssolie » Mon Sep 19, 2011 5:52 am

You should stick to using -gstabs all the time anyway.

I realize it is a tad annoying but not really worth fixing until we upgrade the compiler to the latest GCC version.
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1009
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada

Re: gcc bug with -ggdb?

Postby Raziel » Sat Sep 24, 2011 9:33 pm

@ssolie

Nope, that a sensible hint and a very easy workaround and it makes it even more sensible receiving this workaround from a dev :-)

I'll stick with -gstabs and hope you have already cornered the problem

Here's hoping for gcc4.4.4 :-)

Thanks a lot
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 864
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains


Return to SDK Support

Who is online

Users browsing this forum: No registered users and 1 guest