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 instrumentation. Inserts a call to
"__sanitizer_cov_trace_pc" into every basic block.
And put corresponding builtins to the true/false branches in the instrumented
code.
Martin
Best,
Shuai
On Wed, Jun 17, 2020 at 2:52 PM Martin Liška <mli...@suse.cz
<mailto:mli...@suse.cz>> wrote:
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
> I am aware of how to use gcov for c code line coverage collection.
However,
> currently I am working on a piece of GIMPLE code (did some
instrumentation
> on the GIMPLE code and therefore is more complex compared to the
original C
> code)l, and would like to collect the line coverage info of GIMPLE code
> with gcov. Is it possible to do so? If so, could anyone shed some light
on
> this? Thank you very much.
>
> Best,
> Shuai
>