This is the mail archive of the gdb@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]

RFC: Formatting of type output


Right now, we get as much as we can from demangled names when we print
classes.  Fine for stabs, but for dwarf and (say) constructors, we don't
have a demangled name to use.

We can print the methods using just their types, from the debug info.  We
have plenty of information for doing that.

That means that, regrettably, they are formatted differently; it is closer
to the v2 demangler than to the v3 demangler, but different from both
(classes get prefixed by "class" even in C++, for example).

Does anything mechanical depend on the format of type output, besides our
testsuite?  Does anyone have any radically strong feelings about how it
should be formatted?  I believe that it should at least be consistent with
itself, and the only possible way to achieve that is to use the type
information at all times.  It'll require some cleanups to the involved code
(for instance, lookup_opaque_type currently kills qualifiers!  Patch later
this week when I have a moment) but will actually simplify the testsuite
quite a bit (since we will not have to cope with multiple demanglers, only
multiple class layouts).

Similarly, does anyone prefer to have vtbl and vbase pointers explicitly
printed?  It seems cleaner to me to suppress them, and perhaps offer another
way to print them explicitly.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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