This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Debugging of clones


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


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