This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: beta patch for PR 9065
On Tue, Feb 16, 2010 at 03:27:47PM -0700, Tom Tromey wrote:
> >>>>> "Daniel" == Daniel Jacobowitz <dan@codesourcery.com> writes:
>
> Daniel> It's been a while since I looked at this, but the typeinfo for a class
> Daniel> with RTTI should be available in the symbol table (_ZTI
> Daniel> symbols).
>
> Oh, right. Maybe I was confusing this w/ a vtable slot, whoops.
It's both, but there are also _ZTI symbols for things without vtables;
e.g. standard types ("int") and classes without a vtable but where
typeid was used. The vtable's probably preferable where available.
> Daniel> We could synthesize a type_info object; the Itanium C++ ABI defines
> Daniel> the layout (section 2.9.5). But we might also have to synthesize its
> Daniel> name() method, as it is unlikely to be emitted out of line.
>
> I think it would be acceptable, though not ideal, to give an error in
> this situation.
Yes - it's a more general problem - IMO it'd be nice to be able to
have scripts implement not-outlined methods. std::string.length() is
probably similar...
--
Daniel Jacobowitz
CodeSourcery