Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 32 位机器上使用 -fprofile-arcs -ftest-coverage 标志交叉编译我的可执行文件以进行覆盖。生成的可执行文件我在 64 位的目标机器上运行它。
当我运行可执行文件时,它不会生成 .bb .bbg 和 .da 文件。可能是什么原因。
最可能的原因是数据文件生成在与编译相同的目录中,这些文件可能无法在执行测试的目标平台上访问或写入。
对于最近的 gcc 版本,环境变量 GCOV_PREFIX 和 GCOV_PREFIX_STRIP 可用于覆盖默认目录。