Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* warning: RTTI symbol not found for class
@ 2012-11-21 18:08 ali_anwar
  2012-11-21 18:32 ` Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: ali_anwar @ 2012-11-21 18:08 UTC (permalink / raw)
  To: gdb-patches, keiths, Jan Kratochvil

[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]

Hi,

While debugging a cpp demo (containing the std::cout call) when I issue 
"p std::cout", I get following warning: "warning: RTTI symbol not found 
for class 'std::ostream'".

Even after setting the print object off.

set print object off
p std::cout
$4 = warning: RTTI symbol not found for class 'std::ostream'


Attached patch is a work around for it.

I also came across following mail thread:
http://www.sourceware.org/ml/gdb-patches/2011-08/msg00474.html

I have verified that this work around also works for the bug 1266 
mentioned in the mail:

b calltest(std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >)
Breakpoint 11 at 0x1d58: file ../src/cpp_.cpp, line 5.
b calltest(foo)
Note: breakpoint 11 also set at pc 0x1d58.
Breakpoint 12 at 0x1d58: file ../src/cpp_.cpp, line 5.
b calltest(std::string)
Note: breakpoints 11 and 12 also set at pc 0x1d58.
Breakpoint 13 at 0x1d58: file ../src/cpp_.cpp, line 5.

Do we have any fix for this issue if not then is it ok to have this work 
around until we get a proper fix?

I have not added the DMGL_VERBOSE to dwarf2_physname and 
lookup_symbol_in_language as I saw the Keith's mail thread after testing 
my patch. Also as I have not seen that part of the code (I thought to 
share the patch before doing so) so I am not sure why its going to be 
useful to have DMGL_VERBOSE added there.

Thanks,
-Ali

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gdb_demangle.patch --]
[-- Type: text/x-patch; name="gdb_demangle.patch", Size: 1056 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14849
diff -u -r1.14849 ChangeLog
--- ChangeLog	21 Nov 2012 14:09:03 -0000	1.14849
+++ ChangeLog	21 Nov 2012 16:38:10 -0000
@@ -1,3 +1,7 @@
+2012-11-21  Ali Anwar  <ali_anwar@codesourcery.com>
+
+	* gdbtypes.c (symbol_find_demangled_name): Add DMGL_VERBOSE.
+
 2012-11-21  Yao Qi  <yao@codesourcery.com>
 
 	PR tdep/7438
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.323
diff -u -r1.323 symtab.c
--- symtab.c	20 Nov 2012 22:51:04 -0000	1.323
+++ symtab.c	21 Nov 2012 16:38:12 -0000
@@ -593,7 +593,7 @@
       || gsymbol->language == language_auto)
     {
       demangled =
-        cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI);
+        cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE);
       if (demangled != NULL)
 	{
 	  gsymbol->language = language_cplus;

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

end of thread, other threads:[~2012-11-26 20:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21 18:08 warning: RTTI symbol not found for class ali_anwar
2012-11-21 18:32 ` Jan Kratochvil
2012-11-26 19:14   ` ali_anwar
2012-11-26 19:23     ` Tom Tromey
2012-11-26 20:47       ` ali_anwar
2012-11-26 20:53         ` ali_anwar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox