This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
C++ names in backtrace
- From: "Bobo" <spiridenok at tut dot by>
- To: gdb at sourceware dot org
- Date: Fri, 30 Nov 2007 12:38:25 +0200
- Subject: C++ names in backtrace
Hello all,
I've got a question about gdb & its backtrace command.
When i have a breakpoint hit in gdb in my C++ application i want to see the
call stack. Using backtrace command i get something like that:
(gdb) backtrace
#0 _ZN7WSLCLAG21select_actuator_parmsEi (this=0x1bc148, parms_set_id=0) at
WSLCLAG.cpp:151
#1 0xff063fd8 in
_ZN9WSLCLAGSS21select_actuator_parmsE36WSPIFACSS_actuator_parms_set_id_enum
(this=0x1bc148,
parms_set_id=WSPIFACSS_ACTUATOR_PARMS_SET_ID_NORMAL) at
WSLCLAGSS.cpp:137
#2 0x0004a330 in _ZN12WSLCLAGSStst18test_select_paramsEv (this=0xa0784) at
WSLCLAGtst.hpp:123
#3 0x00049e8c in
_ZN47TestDescription_WSLCLAGSStst_test_select_params7runTestEv
(this=0xa07f0)
at WSAct_unit_tester.cpp:44
#4 0x00030e14 in _ZN7CxxTest19RealTestDescription3runEv (this=0xa07f0)
at ../../../xinc/cxxtest/RealDescriptions.cpp:96
#5 0x0003e08c in _ZN7CxxTest10TestRunner7runTestERNS_15TestDescriptionE
(this=0xffbfe25f, td=@0xa07f0)
at ../../../xinc/cxxtest/TestRunner.h:74
#6 0x0003df04 in _ZN7CxxTest10TestRunner8runSuiteERNS_16SuiteDescriptionE
(this=0xffbfe25f, sd=@0xa0794)
at ../../../xinc/cxxtest/TestRunner.h:61
#7 0x0003dc78 in _ZN7CxxTest10TestRunner8runWorldEv (this=0xffbfe25f)
at ../../../xinc/cxxtest/TestRunner.h:46
#8 0x0003daf0 in _ZN7CxxTest10TestRunner11runAllTestsERNS_12TestListenerE
(listener=@0xffbfe348)
at ../../../xinc/cxxtest/TestRunner.h:23
#9 0x0003da50 in _ZN7CxxTest14ErrorFormatter3runEv (this=0xffbfe348)
at ../../../xinc/cxxtest/ErrorFormatter.h:47
#10 0x0002ed78 in main () at WSAct_unit_tester.cpp:20
The C++ names (classes & methods) are not really readable in this output
(well i can derive them from the characters shown in gdb, but it takes me
some mental effort and it's also error prone). I understand that the names i
see are C++ mangled names.
However if i type in gdb l MyClass::my_function i get the correct names
displayed. Also if i put a breakpoint in this function it gets hit. So gdb
has some way to translate "human readable" C++ names into mangled onces.
My question:
- is there any way to let gdb display the real C++ names iso the mangled
ones in commands like backtrace?
I'm using gdb >6.7.1 on SUN Solaris, i build my applications with gcc 3.x.
-----------
IRR.BY ('Из рук в руки – Онлайн') – крупнейший в Беларуси
сайт частных объявлений. http://irr.by