C++ demangling question

Nathan Sidwell nathan@acm.org
Wed Jun 12 02:34:00 GMT 2002


Wirawan Purwanto wrote:
> 
> I played around with c++filt to get the demangled names of the subroutines
> in my object file, and I found several "attributes" on the
> constructor/destructor that I didn't recognize, for example:
> 
> QMBS_Hubbard<(unsigned)1, EllipsoidRectLattice,
> AFQMC_boson_reps>::QMBS_Hubbard[not-in-charge]()
> QMBS_Hubbard<(unsigned)1, EllipsoidRectLattice,
> AFQMC_boson_reps>::QMBS_Hubbard[in-charge]()
> non-virtual thunk [nv:-52] to QMBS_Hubbard<(unsigned)1,
> EllipsoidRectLattice, AFQMC_boson_reps>::~QMBS_Hubbard [in-charge]()
> Hubbard_QMC::~Hubbard_QMC [in-charge]()
> non-virtual thunk [nv:-52] to Hubbard_QMC::~Hubbard_QMC [in-charge]()
> Hubbard_QMC::~Hubbard_QMC [in-charge deleting]()
> non-virtual thunk [nv:-52] to Hubbard_QMC::~Hubbard_QMC [in-charge
> deleting]()
> ...
> 
> What does it mean with "in-charge", "not-in-charge", etc? Or could you refer
> to the documentation that discuss these things?
The ABI spec @ http://www.codesourcery.com/cxx-abi/ should help.

The in-charge thing is for ctors/dtors of classes with virtual bases.
Such cdtors need to know whether they are responsible for dealing
with the virtual bases (in-charge) or are cdtoring the base of another
object, and so should not do the virtual bases (not-in-charge).

The thunk thing is for overridden virtual functions when there
needs to be an adjustment to the this pointer from the declaring class
to the overriding class.

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
           The voices in my head told me to say this
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk



More information about the Gcc mailing list