zero9178 / C-Cpp-Coverage-for-CLion

Get coverage data in CLion using gcov or llvm-cov
MIT License
38 stars 2 forks source link

gcov called with -b arg even though branch coverage is disabled #8

Closed theKBro closed 5 years ago

theKBro commented 5 years ago

Since version 2.0.0 we have the problem, that it always tries to evaluate the coverage data ( I personally liked the extra cover button ) and it always calls gcov with -b argument which causes gcov to crash. Disabling all "Enable Branch ..." settings does not change anything.

Tried with GCC 8.1 and 6.3.

zero9178 commented 5 years ago

Just pushed the 2.0.2 Release which adds two new settings. It should arrive in around one or two days as soon as Jetbrains has verified it. One is to disable auto run by compiler flags detection and instead show the Run coverage button as in the pre 2.0.0 versions. The other setting disables branch coverage completely and stops it from passing -b to gcov. Hope this should help. Thank you for reporting your use case as I wouldn't have come up with that considering my workflow. Just curious, which gcov are you using that it supports line coverage and exporting, but doesn't support branch coverage?

theKBro commented 5 years ago

gcc version 8.1.0 (i686-win32-dwarf-rev0, Built by MinGW-W64 project) gcov (i686-win32-dwarf-rev0, Built by MinGW-W64 project) 8.1.0

gcov has the option -b but it crashes if I'm using it I had no problems with previous versions of this plugin, but I do not know with which arguments gcov used to be called in the previous versions. This may additionally is a problem of the MinGW-W64 project.

zero9178 commented 5 years ago

Have seen those crashes with bigger projects as well but never boiled it down to the branch coverage option. Seeing as I am not going to implement branch coverage for sub gcc 9 I should probably never pass it to gcov. Thanks for the insight

theKBro commented 5 years ago

Thanks for your fast response and help!