|
From: | Naam Nahin |
Subject: | Re: Re: gdb backtrace for g++ programs showing ?? symbol |
Date: | Sun, 24 Feb 2008 18:31:01 +0530 |
User-agent: | Thunderbird 2.0.0.6 (X11/20071022) |
Paul Pluzhnikov wrote:
"naam nahin" <naam.yaad.nahin@gmail.com> writesI am trying to debug a C++ program on Linux. g++ version is 4.1.3. While debugging the program under gdb, I get a SIGABRT with the following backtrace: #4 0xb7ef0f65 in ?? () from /usr/lib/libstdc++.so.6However, I don't know why I see "??" as the function symbol inframe 4. Why can't gdb show me the function name for that function?Probably because there is no 'reasonable' function for gdb to print: your libstdc++ was built without debug info, and is likely partiallystripped of symbols.
Thanks for the details. To get the debug version of libstdc++, I installed the debug library and passed in -D_GLIBCXX_DEBUG as a command line parameter. However, I still see (through ldd) that my program depends upon the release version of libstdc++ and does not show the full debug stack trace (like the one you have shown). How do I link against the debug version of libstdc++? The reason I am asking this is that I have a program which throws a segmentation fault when an exception is thrown. However, in that case, there is an exception handler that is in my program. The exact same program runs fine under Microsoft's c++ compiler on Windows but crashes horribly with a SIGSEGV under Linux. It is further complicated by the fact that the program uses gcc 2.96 ... The stack trace for that shows the stack is not being unwound properly, it seems to be going of to functions which were not even on the call stack! It seems that gcc 2.96 (and libstdc++) had some problems with exceptionhandling code (mentioned at http://rhn.redhat.com/errata/RHBA-2002-055.html).
However, even installing these patches did not help. Any suggestions to tackle this problem would be very helpful ... Cheers, Naam Nahin
[Prev in Thread] | Current Thread | [Next in Thread] |