-
Notifications
You must be signed in to change notification settings - Fork 1
File format
Mitchell Hentges edited this page Feb 6, 2017
·
20 revisions
These are binary files. Reference
gcda
and gcno
files follow the same "container" format:
Offset | Size (bytes) | Purpose | Ignored? |
---|---|---|---|
0 | 4 | Magic String ("gcda" or "gcno") | |
4 | 4 | Version | |
8 | 4 | Stamp (used for "merging") | x |
12 | * | Contains record s |
Each file is contained with different types of record
s.
Offset | Size (bytes) | Purpose | Ignored? |
---|---|---|---|
0 | 4 | Identifier | x |
4 | 4 | Line # Checksum | x |
8 | 4 | Config Checksum | x |
12 | 4 | Fn Name Length | |
16 | ^ | Fn Name | |
? | 4 | Source Path Length | |
? | ^ | Source Path | |
? | 4 | Line # |
Some exceptions, see gcov header
Offset | Size (bytes) | Purpose | Ignored? |
---|---|---|---|
0 | 4 | Block # | x |
4 | ? | Contains multiple line s |
Where each line is:
Offset | Size (bytes) | Purpose | Ignored? |
---|---|---|---|
0 | 4 | Line # | |
------ | ------ | If Line # == 0 , then changing file: |
------ |
4 | 4 | Next filename's size | |
8 | ^ | Next filename |
This is a text file. Reference
Prefix | Purpose | Data Format | Strategy |
---|---|---|---|
TN | Test Name | String name of test | Leave blank, like lcov is doing in local tests |
SF | Source File | Absolute path to source file | |
FN | Function | line # of fn start, fn name | |
FNDA | Fn Data | Execution count of fn, fn name | |
FNF | # Fn Found | integer | |
FNH | # Fn Executed | integer | |
DA | Executions for some Line | line #, execution count | |
LF | # Lines Found | integer | |
LH | # Lines Executed | integer | |
end_of_record |
End of Record | Signifies end of data for source file | Use the constant "end_of_record " |