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]

TYPE_VPTR_BASETYPE and TYPE_DOMAIN_TYPE


What's the deal with TYPE_VPTR_BASETYPE and TYPE_DOMAIN_TYPE being the
same thing?  Did struct main_type once contain two different members
that got merged?  It seems like a potential source of confusion right
now (it certainly slowed me down when tracking down a recent bug).

It seems like there are two obvious fixes.  If we're not planning to
split them back apart in the near future, then either
TYPE_VPTR_BASETYPE or TYPE_DOMAIN_TYPE should be elimininated.  If we
want to leave open the possibility of splitting them back apart,
however, then the comment before the definition of the vptr_basetype
field should be emended to say when you're supposed to use
TYPE_VPTR_BASETYPE to access it and when you're supposed to use
TYPE_DOMAIN_TYPE to access it.  (And, of course, all uses should be
checked to make sure they follow that recommendation.)

I'd be happy to make either of those changes, if people agree that one
of them is a good idea.

David Carlton
carlton@math.stanford.edu


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