-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
According to the lcov documentation, `FN` field can contain optional end line number. Right now the code crashes in this case. This commit makes sure it doesn't and it's well parsed. Ref: https://manpages.ubuntu.com/manpages/noble/man1/geninfo.1.html ``` Following is a list of line numbers for each function name found in the source file: FN:<line number of function start>,(<line number of function end>,)?<function name> The 'end' line number is optional, and is generated only if the compiler/toolchain version is recent enough to generate the data (e.g., gcc 9 or newer). ```
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
test/functional/expected_results/test1.end_line_number_fn.info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
TN: | ||
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp | ||
FN:3,10,_Z3foob | ||
FNDA:1,_Z3foob | ||
FNF:1 | ||
FNH:1 | ||
DA:3,1 | ||
DA:5,1 | ||
DA:7,1001 | ||
DA:8,1000 | ||
DA:10,1000 | ||
DA:11,0 | ||
DA:14,1 | ||
LF:7 | ||
LH:6 | ||
end_of_record | ||
TN: | ||
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp | ||
FN:3,10,_Z3barbii | ||
FNDA:10,_Z3barbii | ||
FNF:1 | ||
FNH:1 | ||
DA:3,10 | ||
DA:5,10 | ||
DA:6,10 | ||
DA:8,0 | ||
LF:4 | ||
LH:3 | ||
end_of_record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters