Closed phil-zxx closed 1 week ago
The missing lines in your first example appear to be a bug in gcc/gcov that I have noticed as well ☺
The missing function in your second example appears to be the one described in issue #98. (I implemented a workaround in my lcov branch – pull request not integrated yet - see the description of the issue and the workaround.)
A similar filtering hack could be done for your first issue as well (but it hasn’t gotten painful enough for me to need to do it yet).
Hope this helps.
Henry
This one has been open with no activity for a very long time.
I just checked in a new --filter initializer
feature to address this scenario.
It seems to work for this specific example, as well as for a bunch more in various of our projects.
However: this filter should be considered experimental/potentially flakey - at least until it gets some wider use and testing.
In the meantime: I am closing this issue. If there is still a problem: please feel free to reopen this issue or file a new one (better option is to file new, possibly referring back to this one). Please include an example which illustrates the problem. You probably also need to specify platform, compiler version, etc - as some compilers and some versions do better or worse at initializer instrumentation.
Henry
I have 2 examples, where
lcov
shows missing coverage. It seems this is incorrect as all functions & lines of code are covered. Perhaps I am missing a flag to achieve full coverage? Is there anything I can do to fix this?Build Steps
Example 1
which gives
Example 2
which gives