Using -gstabs (or -gstabs+) in a general purpose Makefile is probably a bad idea because it may force gcc to use stabs; stabs might not be the best debugging format available on a user's system. For example, DWARF is supposed to be vastly superior all around from what I hear. Apple just adopted DWARF in Xcode 2.3 about 4 months ago and I'm already reading many anecdotal stories about how DWARF has fixed all the problems people had with stabs. I know for a fact that using DWARF instead of stabs cut the OSG debug files binary size by about 90% (1GB to 100MB). I'm thinking about making this the default option for the Xcode projects.
Also, for -gstabs+, if the flag is accepted and you are using debug tools other than raw gdb, I think the tools may crash or be unable to read the program. I think -ggdb picks a default, though it is not necessilariy the best option. (For example, I think Apple still picks stabs as the default.) But this is probably the safest option to use in a general purpose Makefile. I'm not sure what gets picked if you include both -ggdb and another flag like -gstabs, but it's probably best to avoid putting both down. -Eric
Hi Mark, I put in the gstabs+ argument quite a while back when I posted a problem on the gcc mailing list and was recommended this option. I now read the doc on it and it seems like it is an option specific to BSD, so we should change makedefs accordingly. However, I would not expect changes destined for BSD platforms to affect other platforms, so it would seem that this is a bug. BTW, we use both -gstabs+ and -ggdb currently. -don On 9/22/06, Mark Acosta <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I just put together a brand spanking new linux box running 64 bit > fedora core 5 and much to my suprise, I found that gdb was unable to access > any memory while debugging an osg program. After much head banging, I > tracked the problem down to the -gstabs+ compile option. I switched to -ggdb > in osg, Producer and OpenThreads and in my own code and now gdb works fine. > I was running 32 bit fedora core 5 before and there wasn't any problem with > gdb there. I'm not sure if this is a 64 bit gdb or gcc/g++ bug or what. > Anybody else ever run into this problem or even not have this problem? By > the way, I'm using gcc 4.1.1 and gdb 6.3. > > Also, I noticed that when doing a "make instlinks" , osg will install > in /usr/local/lib64, which I assume is correct, but Producer and OpenThreads > will always install in /usr/local/lib even if I specify ARCH=64. I took a > look at the make files but I don't see anything obviously wrong. > > Thanks, > > Mark Acosta > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openscenegraph.net/pipermail/osg-users/attachments/20060924/ffaca0af/attachment-0001.html ----------------
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
