On Thu, 7 Feb 2008, Oliver Gerlich wrote:
> that sounds quite like I was looking for. But one thing that I've wondered
> about in particular when using Valgrind for coverage is how it works with C++
> templates? If a template is never instantiated, how can a coverage tool
> detect that there is source code that is never executed? Is that possible
> somehow?
My tool just records which instructions get executed, and then maps that
back to the source code lines according to the debug info. It also
identifies source lines mentioned in the debug info which weren't executed.
So I don't know the answer to your question, it depends entirely how GCC
produces its debug info for templates, but I suspect the lines of code
within the template would end up marked as unexecuted.
Nick
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users