help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb backtrace for g++ programs showing ?? symbol


From: Paul Pluzhnikov
Subject: Re: gdb backtrace for g++ programs showing ?? symbol
Date: Sat, 23 Feb 2008 10:03:44 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"naam nahin" <naam.yaad.nahin@gmail.com> writes:

> I 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:
> #0  0xffffe410 in __kernel_vsyscall ()
> #1  0xb7ce7875 in raise () from /lib/tls/i686/cmov/libc.so.6
> #2  0xb7ce9201 in abort () from /lib/tls/i686/cmov/libc.so.6
> #3  0xb7ef36e0 in __gnu_cxx::__verbose_terminate_handler () from 
> /usr/lib/libstdc++.so.6
> #4  0xb7ef0f65 in ?? () from /usr/lib/libstdc++.so.6
> #5  0xb7ef0fa2 in std::terminate () from /usr/lib/libstdc++.so.6
> #6  0xb7ef10ca in __cxa_throw () from /usr/lib/libstdc++.so.6
> #7  0x08048a5e in foo ()
> #8  0x08048ac6 in main ()
> It is expected because I am not catching the exception I am throwing.

It may be expected, but it is *not* happening.

> However, I don't know why I see "??" as the function symbol in
> frame 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 partially
stripped of symbols. FWIW, here is what it would have looked like
if gdb were able to find proper symbol:

#1  0x00b86e59 in raise () from /lib/tls/libc.so.6
#2  0x00b88882 in abort () from /lib/tls/libc.so.6
#3  0x006bd614 in __gnu_cxx::__verbose_terminate_handler () at 
../../.././libstdc++-v3/libsupc++/vterminate.cc:97
#4  0x006bb005 in __cxxabiv1::__terminate () at 
../../.././libstdc++-v3/libsupc++/eh_terminate.cc:43
#5  0x006bb042 in std::terminate () at 
../../.././libstdc++-v3/libsupc++/eh_terminate.cc:53
#6  0x006bb17a in __cxa_throw () at 
../../.././libstdc++-v3/libsupc++/eh_throw.cc:77
#7  0x080484e8 in foo () at t.cc:1
#8  0x08048509 in main () at t.cc:2

But none of this matters: everything below 'std::terminate()'
is implementation detail you shouldn't care about: once
'std::terminate()' is called, you are dead.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]