From: Peter O. <obe...@us...> - 2010-10-28 14:16:42
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14807 Modified Files: geninfo Log Message: geninfo: apply exclusion marker to derived function data When option --derive-func-data is used together with exclusion markers, function data for excluded lines is still included. Fix this by only deriving function data for lines which are instrumented and not excluded. Reported by: be...@gm... Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** geninfo 31 Aug 2010 08:19:03 -0000 1.87 --- geninfo 28 Oct 2010 14:16:34 -0000 1.88 *************** *** 650,653 **** --- 650,654 ---- my $line_data = $bbdata->{$fn}; my $line; + my $fninstr = 0; if ($fn eq "") { *************** *** 657,662 **** --- 658,666 ---- $count = 0; foreach $line (@$line_data) { + my $linstr = $gcov_content[ ( $line - 1 ) * 3 + 0 ]; my $lcount = $gcov_content[ ( $line - 1 ) * 3 + 1 ]; + next if (!$linstr); + $fninstr = 1; if (($lcount > 0) && (($count == 0) || ($lcount < $count))) { *************** *** 664,667 **** --- 668,672 ---- } } + next if (!$fninstr); $fn_count{$fn} = $count; } |