From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30434 invoked by alias); 30 Nov 2007 10:38:40 -0000 Received: (qmail 30425 invoked by uid 22791); 30 Nov 2007 10:38:39 -0000 X-Spam-Check-By: sourceware.org Received: from mail.tut.by (HELO speedy.tutby.com) (195.137.160.40) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Nov 2007 10:38:31 +0000 Received: from [194.105.120.70] (account spiridenok@tut.by) by speedy.tutby.com (CommuniGate Pro WEBUSER 5.1.12) with HTTP id 442107317 for gdb@sourceware.org; Fri, 30 Nov 2007 12:38:25 +0200 From: "Bobo" Subject: C++ names in backtrace To: gdb@sourceware.org X-Mailer: CommuniGate Pro WebUser v5.1.12 Date: Fri, 30 Nov 2007 10:38:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain;charset=windows-1251;format="flowed" Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00285.txt.bz2 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