<div dir="ltr"><div>Hi, all<br><br>I want to instrument a program automatically so that
 it prints "hello" before each conditional statement. For example, 
consider the function P below.<br><br>    int P(int x) {<br>     if (x<3)<br>        if (x>0)<br>           return 1;<br>     return 0;<br>   }<br><br>Let P_instrum be the instrumented version of P.  It is expected that:<br><br>-- P_instrum(1)  prints two "hello"s <br>-- P_instrum(-1) prints one "hello"<br>-- P_instrum(5)  prints no "hello"<br> <br>From my understanding about <a href="http://clang.llvm.org/docs/SanitizerCoverage.html" target="_blank">Clang's sanitizer coverage,</a>
 we can use a sanitizer to achieve this instrumentation.  However, so 
far I have not found a working example or snippet code to get started. 
Any idea?<br><br></div>Thanks,<br clear="all"><br clear="all"><div><div data-smartmail="gmail_signature">Zhoulai</div></div></div>