public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* C++ names in backtrace
@ 2007-11-30 10:38 Bobo
  2007-11-30 14:46 ` Daniel Jacobowitz
  2007-11-30 14:52 ` Paul Koning
  0 siblings, 2 replies; 8+ messages in thread
From: Bobo @ 2007-11-30 10:38 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-12-07  8:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-30 10:38 C++ names in backtrace Bobo
2007-11-30 14:46 ` Daniel Jacobowitz
2007-11-30 14:52 ` Paul Koning
2007-11-30 15:03   ` Dima S
2007-11-30 18:45     ` Stan Shebs
2007-12-05 12:49       ` Dima S
     [not found]         ` <18262.48200.586110.349260@pkoning-laptop.equallogic.com>
2007-12-07  8:29           ` Dima S
     [not found]     ` <18256.10018.785226.339384@pkoning-laptop.equallogic.com>
2007-12-05 12:47       ` Dima S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).