This is the mail archive of the gdb-patches@sources.redhat.com 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: [patch/rfc] gdb.c++/templates.exp, pr gdb/1063


On Tue, 25 Feb 2003 19:15:36 -0500, Daniel Jacobowitz <drow at mvista dot com> said:

> Note that we can't print out the above in stabs or dwarf-2; neither of
> them puts the abstract type in the debug info, only the referenced
> type.  DWARF-2 can say a bit more than it does now - specifically, that
> "int" is a template paramater for C - but "DWARF does not represent the
> generic template definition, but does represent each instantiation"
> according to the v3 draft.

Thanks for the info; I hadn't gotten around to looking at the relevant
parts of the DWARF standard yet.

> The reason we often print out one of the instantiations is because each
> C<T> contains a nested typedef for C in the DWARF-2.  We don't handle
> nested types right yet.

Ah.  Hmm.  Why does it contain a nested typedef for C?  I guess that
makes sense: 14.6p2 gives an example of how you can use C to refer to
C<T> within the definition of C<T>.

In that case, I don't think that the desire of the original test case
(i.e. printing out actual template info) is reasonable: it's not the
job of GDB's test suite to lobby for improvements in debugging
formats.  So I think the proper behavior is to delete the original
success regexps, to decide that, in this situation, GDB shouldn't
print out any information (which is what currently happens with GCC
2.95.3/stabs), to KFAIL the situations where it does print out an
instantiation with reference to a PR about nested classes (I assume we
have such a PR, if not I'll create one), and to close PR 1063 with an
appropriate comment.

How does that sound?

David Carlton
carlton at math dot stanford dot edu


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