[cfe-dev] Code instrumentation in Clang?

Robert Ankeney rrankene at gmail.com
Tue Jan 31 07:10:25 PST 2012


Thanks for the pointer.  TestCocoon looks promising, though I'm
looking at performing Modified Condition/Decision Coverage (MC/DC) and
perhaps perform some metrics.  In any case, I was looking at doing
something to get more involved in Clang.  I'll have a look at
TestCocoon and maybe I can contribute there too.

Robert

On Sun, Jan 29, 2012 at 1:28 PM, Stephen Kelly [via Clang Developers]
<ml-node+s42468n3698305h2 at n3.nabble.com> wrote:
> Robert Ankeney wrote:
>
>> I'm trying to get up to speed on using Clang by doing a bit of dynamic
>> code analysis by instrumenting C (and maybe C++) code where I take a
>> source file and generate an instrumented output. I'd like to add a
>> function call at the beginning of any block to mark statement coverage
>> and also change all boolean expressions to call some function so I can
>> track that too. For example:
>> foo = a && (b || c);
>> would become something like:
>> foo = EXPR_AND(a, EXPR_OR(b, c));
>> and thus I can track all combinations of conditions that occur.  I'd
>> need to track where in the source code I am too, and save that info
>> seperately.  This is a bit beyond what gcov provides.
>> I'm gussing that using a RecursiveASTVisitor would be the best
>> approach, but whatever approach I take, is there an easy way to output
>> the C code for each node I visit?
>> Any suggestions of what to look at to accomplish something like this
>> would be most appreciated!
>>
>
> TestCocoon does exactly that:
>
> http://www.testcocoon.org/
>
> Thanks,
>
> Steve.
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://clang-developers.42468.n3.nabble.com/Code-instrumentation-in-Clang-tp3678010p3698305.html
> To unsubscribe from Code instrumentation in Clang?, click here.
> NAML


--
View this message in context: http://clang-developers.42468.n3.nabble.com/Code-instrumentation-in-Clang-tp3678010p3703614.html
Sent from the Clang Developers mailing list archive at Nabble.com.




More information about the cfe-dev mailing list