Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Benjamin Kosnik <bkoz@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: can't find class named `foo', as given by C++ RTTI
Date: Fri, 29 Jun 2001 11:15:00 -0000	[thread overview]
Message-ID: <npr8w3rw10.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <200106280455.f5S4t6T07564@fillmore.constant.com>

Benjamin Kosnik <bkoz@redhat.com> writes:
> This is a new class of errors that I've started seeing recently. I'm
> getting this from debugging efforts on x86/linux with current CVS
> 'src' and 'gcc' modules. For what it's worth, both --with-dwarf2 and
> default toolchains have the same error.
> 
> 
> (gdb) p *__fp
> can't find class named `std::numpunct<char>', as given by C++ RTTI

This means is that GDB wanted to find the run-time type of some object
(probably *__fp), and failed.  Here's how GDB tries to find an
object's run-time type:
- GDB extracts the object's vtable.
- it looks up the linker symbol naming the vtable (which was
  _ZTVSt8numpunct, or something like that).
- it demangles that name (and got "vtable for std::numpunct")
- it pulls off the "vtable for " part
- it tries to look up the type name (in this case, "std::numpunct") in
  its full symbol table
  
In this case, GDB wasn't able to find the name std::numpunct.

Probably GDB should have been able to find std::numpunct.  But does
the rest of the process look reasonable?  That is, was the run-time
type of *__fp indeed `std::numpunct'?  The output from `ptype'
suggests that its compile-time type is `class facet'.  Perhaps
something went wrong well before we ever tried to look up the type
name.


  parent reply	other threads:[~2001-06-29 11:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-27 21:55 Benjamin Kosnik
2001-06-27 22:25 ` Daniel Berlin
2001-06-27 22:51   ` Benjamin Kosnik
2001-06-27 23:26     ` Daniel Berlin
2001-06-28  1:37       ` Benjamin Kosnik
2001-06-27 23:06   ` Daniel Berlin
2001-06-28  1:32     ` Benjamin Kosnik
2001-06-28 16:02       ` Daniel Berlin
2001-06-28 16:14         ` Benjamin Kosnik
2001-06-29 15:14     ` Jim Blandy
2001-06-29 23:43       ` Daniel Berlin
2001-06-30 10:14         ` Jim Blandy
2001-06-29 11:15 ` Jim Blandy [this message]
2001-06-29 11:20   ` Daniel Berlin
2001-06-29 11:34     ` Benjamin Kosnik
2001-06-29 11:38   ` Daniel Berlin

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=npr8w3rw10.fsf@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=bkoz@redhat.com \
    --cc=gdb@sources.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