Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RFC: Formatting of type output
@ 2001-12-06  9:01 Daniel Jacobowitz
  2001-12-06 12:43 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-12-06  9:01 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: RFC: Formatting of type output
@ 2001-12-06  9:39 Michael Elizabeth Chastain
  2001-12-06 12:42 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2001-12-06  9:39 UTC (permalink / raw)
  To: drow, gdb

Good morning Daniel,

> Does anything mechanical depend on the format of type output, besides our
> testsuite?

AFAIK, the white-space changes between v2 g++ and v3 g++ haven't
caused any external consumers of this information to break in such a way
that bug reports have reached the gnats database or the gdb mailing
lists.  So I would suspect "no".

> Does anyone have any radically strong feelings about how it
> should be formatted?

Basically no.

> Similarly, does anyone prefer to have vtbl and vbase pointers explicitly
> printed?

Are you talking about "ptype *Foo" or "print *pFoo" here?

At my day job, I use cygwin + gcc 2.95.3 + pthreads + gdb,
and the vtbl pointer is a quick indicator whether a pointer points
to a sane, live object.  That is a case of "print *pFoo".

> It seems cleaner to me to suppress them, and perhaps offer another
> way to print them explicitly.

That would be fine with me.

Michael C


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-12-06 21:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-06  9:01 RFC: Formatting of type output Daniel Jacobowitz
2001-12-06 12:43 ` Eli Zaretskii
2001-12-06 12:54   ` Daniel Jacobowitz
2001-12-06 13:41     ` Eli Zaretskii
2001-12-06  9:39 Michael Elizabeth Chastain
2001-12-06 12:42 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox