This is the mail archive of the
mailing list for the GDB project.
gdb and C++
- From: Christophe LYON <christophe dot lyon at st dot com>
- To: gdb at sources dot redhat dot com
- Date: Fri, 28 Jan 2005 13:52:52 +0100
- Subject: gdb and C++
- Organization: ST Microelectronics
I am working on a port of gdb for one of our processors,
and I am currently dealing with issues in the C++ debug
I lack some background in the way gdb handles C++,
especially when it comes to breaking in constructors/
Our compiler is a retargetting of Open64, relying on
a g++ 3.3.3 front-end, debug info is generated in
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,