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]

Re: RFC: Formatting of type output


On Thu, Dec 06, 2001 at 11:39:10AM -0600, Michael Elizabeth Chastain wrote:
> 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.

I am going to attempt to print types without the use of the demangler,
then.  If I can get it to work adequately, I'll ask again.

> > 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".

OK, that does seem useful.  Survey of facts and opinions:
  - are not part of the explicit data of the class
  - vary wildly depending on one's compiler.  2.95 has vbase pointers
only, 3.0 has vtbl pointers only.
  - are exceedingly useful to people debugging C++ support or Java
support, but not normally useful to people debugging user code.

I'm going to lean towards option (B) [suppressing them by default and
adding a set flag to show them] when I get around to this.  This is at
the bottom of my list though.

-- 
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]