Tool/software:
Since the compiler qualification kit does not help for standard libraries (see here), we are investigating other ways to qualify the standard libraries that come with tiarmclang for our safety-rated use case. One idea includes calculating code coverage of the standard libraries in our tests. We have been playing around with instrumentation options for tiarmclang and linking instrumented libraries that are part of the compiler package. (for example in folder lib/armv7r-ti-none-eabihf/instrumentation64)
Building a binary like this, we see instrumentation information about pre-compiled standard library functions (f.e. from libc) and instantiations of C++ standard templates (like vector) in the section __llvm_prf_cnts. After executing this binary, we can extract the coverage information successfully. However, we have problems extracting this coverage information for the standard libraries using tiarmcov.
First of all, ti runtime libraries seem to be hidden by default in outputs created by tiarmcov. According to the help output, the parameter --include-ti-runtime should change that, but that only works in a very specific output mode (export in JSON format).
Exporting the coverage results in JSON format with --include-ti-runtime does output libc coverage summaries, including information about the code segments. Together with the source code that is included in the compiler package (folder lib/src), it should be possible to create a nice html/human-readable report with the source code. But tiarmcov does not allow --include-ti-runtime with commands other than export.
Why is this restriction built into tiarmcov? Is there some way to still create a readable report with tiarmcov for these libc modules?
Even doing all that, there does not seem to be any coverage information in the tiarmcov output about C++ standard templates, even though they were instrumented and called.
Are we missing some options to make the C++ standard templates visible in the coverage results?