[PATCH] gcov: Mark BBs that do not correspond to a line in source code (PR gcov-profile/79891).

Nathan Sidwell nathan@acm.org
Tue Mar 21 18:39:00 GMT 2017


Martin, Richard,
I've read up on the thread, but I'm not sure where you guys are with an 
actual patch.  From what I Richard nailed it in BZ with the comment that 
the BB should not be associated with any source line.  That's a new 
thing, so I think the gcov format needs extending (at least).

gcov must associate every BB with source line, so that it can present 
data to users.  That's a conflict with the above observation.

I don't understand why gcov does NOT think the line is executed when -a 
is not used:

         -:   29:					/* Following line falsely marked as covered when 
parameter "--rc lcov_branch_coverage=1" is set */
     #####:   30:					ReturnStatus_t = 0;

At least one block associated with line 30 is executed.  Why's it not 
being counted?

But that does seem to be the right output -- we shouldn't count this 
'artificial' block.  So then the question morphs into the -a case:

         1:   30:					ReturnStatus_t = 0;
     $$$$$:   30-block  0
         1:   30-block  1

We do count the artificial block.  Which is inconsistent.

Sorry, at this point I'm lost as to what is being suggested as a solution.

nathan

-- 
Nathan Sidwell



More information about the Gcc-patches mailing list