Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: ali_anwar <ali_anwar@codesourcery.com>
To: <gdb-patches@sourceware.org>, <keiths@redhat.com>,
	Jan Kratochvil	<jan.kratochvil@redhat.com>
Subject: warning: RTTI symbol not found for class
Date: Wed, 21 Nov 2012 18:08:00 -0000	[thread overview]
Message-ID: <50AD181E.1050607@codesourcery.com> (raw)

[-- 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;

             reply	other threads:[~2012-11-21 18:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 18:08 ali_anwar [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50AD181E.1050607@codesourcery.com \
    --to=ali_anwar@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox