Re: Use gcov for line coverage info of GIMPLE code

2020-06-18 Thread Martin Liška
On 6/18/20 4:31 AM, Shuai Wang wrote: Hey Martin, Thanks a lot for the info. I tried to play with __sanitizer_cov_trace_pc but still quite confused on whether it can instrument extra basic blocks introduced by ASAN. Let me present the GIMPLE code for your reference: Probably not. My suggesti

Re: Use gcov for line coverage info of GIMPLE code

2020-06-17 Thread Shuai Wang via Gcc
Hey Martin, Thanks a lot for the info. I tried to play with __sanitizer_cov_trace_pc but still quite confused on whether it can instrument extra basic blocks introduced by ASAN. Let me present the GIMPLE code for your reference: Given the following C code: int main(int argc ,char **argv) {

Re: Use gcov for line coverage info of GIMPLE code

2020-06-17 Thread Martin Liška
On 6/17/20 8:57 AM, Shuai Wang wrote: Hello Martin, The issue is that I want to count the coverage of "true/false" branches taken in sanitizer's if conditions.. I see. Well, you may abuse a bit the existing: -fsanitize-coverage=trace-pc Enable coverage-guided fuzzing code i

Re: Use gcov for line coverage info of GIMPLE code

2020-06-16 Thread Shuai Wang via Gcc
Hello Martin, The issue is that I want to count the coverage of "true/false" branches taken in sanitizer's if conditions.. Best, Shuai On Wed, Jun 17, 2020 at 2:52 PM Martin Liška wrote: > On 6/17/20 5:40 AM, Shuai Wang via Gcc wrote: > > Hello, > > > > Hello. > > Right now, coverage informati

Re: Use gcov for line coverage info of GIMPLE code

2020-06-16 Thread Martin Liška
On 6/17/20 5:40 AM, Shuai Wang via Gcc wrote: Hello, Hello. Right now, coverage information reports line execution of statements that are present in the original source code. Can you make a mapping of the instrumented code to statements that are present in the original source code? Martin