This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ names in backtrace


Thanks for tips! I've tried both of them (print demangle + set language), none of them works :(

$>gdb <my_cpp_application>
GNU gdb 6.7.50.20071104
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) set print demangle
(gdb) set language c++
(gdb) b WSLCLAG.cpp:120
No source file named WSLCLAG.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (WSLCLAG.cpp:120) pending.
(gdb) run
Starting program: <my_cpp_application>
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/lib/ld.so.1"
warning: Lowest section in /usr/lib/libdl.so.1 is .dynamic at 00000094
Running 17 tests
Breakpoint 1, _ZN7WSLCLAG7destroyEv (this=0x14fcd0) at WSLCLAG.cpp:120
120 int actuator_i = 0;
(gdb) backtrace
#0 _ZN7WSLCLAG7destroyEv (this=0x14fcd0) at WSLCLAG.cpp:120
#1 0x0002c5c8 in _ZN12WSLCLAGSStst21test_init_and_destroyEv (this=0x4b62c) at WSLCLAGtst.hpp:97
#2 0x0002c270 in _ZN50TestDescription_WSLCLAGSStst_test_init_and_destroy7runTestEv (this=0x4b660)
at WSLCLAGtst.cpp:32
#3 0x0001df00 in _ZN7CxxTest19RealTestDescription3runEv (this=0x4b660)
at ../../../xinc/cxxtest/RealDescriptions.cpp:96
#4 0x00026f04 in _ZN7CxxTest10TestRunner7runTestERNS_15TestDescriptionE (this=0xffbfe26f, td=@0x4b660)
at ../../../xinc/cxxtest/TestRunner.h:74
#5 0x00026d7c in _ZN7CxxTest10TestRunner8runSuiteERNS_16SuiteDescriptionE (this=0xffbfe26f, sd=@0x4b63c)
at ../../../xinc/cxxtest/TestRunner.h:61
#6 0x00026af0 in _ZN7CxxTest10TestRunner8runWorldEv (this=0xffbfe26f)
at ../../../xinc/cxxtest/TestRunner.h:46
#7 0x00026968 in _ZN7CxxTest10TestRunner11runAllTestsERNS_12TestListenerE (listener=@0xffbfe358)
at ../../../xinc/cxxtest/TestRunner.h:23
#8 0x000268c8 in _ZN7CxxTest14ErrorFormatter3runEv (this=0xffbfe358)
at ../../../xinc/cxxtest/ErrorFormatter.h:47
#9 0x0001be64 in main () at WSLCLAGtst.cpp:20



Fri, 30 Nov 2007 09:51:35 -0500, Paul Koning <pkoning@equallogic.com>



Bobo> ...My question: - is there any way to let gdb display the real C++ Bobo> names iso the mangled ones in commands like backtrace?

Try "set print demangle".

paul





-----------
IRR.BY ('Из рук в руки – Онлайн') – крупнейший в Беларуси сайт частных объявлений. http://irr.by



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]