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]

gdb and C++


Hello,

I am working on a port of gdb for one of our processors,
and I am currently dealing with issues in the C++ debug
support.

I lack some background in the way gdb handles C++,
especially when it comes to breaking in constructors/
destructors.

Our compiler is a retargetting of Open64, relying on
a g++ 3.3.3 front-end, debug info is generated in
Dwarf-2 form.
Being gcc 3.x based, the compiler generates several
variants of constructors and destructors, but gdb
filters them in a way I don't understand.

Basically, I don't see why ctors/dtors are handled
differently from other overloaded functions?

Specifically, I observed that gdb's demangler does
not make any difference between the in-charge and
not-in-charge ctors/dtors, so when the user asks
to set a bkp in a ctor, the proposed list of matching
functions seems to contain several duplicates.
For the time being, we can leave with this.

As of destructors, I saw that the function which
scans the function names to set a bkp stops searching
when the first occurence is found in case of a
destructor. Is this done only the save time, based
on the old ABI where there was only one destructor
for the in-charge/not-in-charge functions?

Any help/comments appreciated,

Thanks,

Christophe Lyon


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