This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Debugging of clones
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Debugging of clones
- From: Jason Merrill <jason at redhat dot com>
- Date: 15 Feb 2001 14:18:56 +0000
- Cc: Daniel Berlin <dberlin at redhat dot com>, gcc at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
I've spent a couple of days messing with issues of clones and dwarf2
debugging information.
On reflection, it seems to me that it makes sense to treat clones like
multiple out-of-line instances of an inline function, much like their
implementation in the frontend. Which they are, really: multiple instances
of the same function, specialized for particular values of an implicit
in-charge parameter.
In dwarf2, this is represented by one abstract entry for an inline
function, followed by references from any inlined or out-of-line (called
concrete) instances back to the abstract entry for symbolic information.
Concrete instances have their own, separate DIEs.
I'm thinking that then the debug info for the class would only mention the
abstract instance--the *INTERNAL* version, which is never actually emitted.
The info for the various specializations would only be emitted at file
(compilation unit) scope, like concrete instances are currently.
As a result, the duplication in the class would go away from GDB's
perspective, though it would need to learn how to deal with multiple
concrete instances of an inline.
Does this all sound reasonable?
Jason