eclipse-cpp-luna-SR1中没有针对静态库项目的源代码覆盖颜色突出显示 [英] No source code coverage color highlighting in eclipse-cpp-luna-SR1 for static library project

查看:73
本文介绍了eclipse-cpp-luna-SR1中没有针对静态库项目的源代码覆盖颜色突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在工具链 gcc 4.9.1
Linux和Windows上都使用 eclipse-cpp-luna-SR1
代码已分区分为两个项目:




  • 静态库项目中的生产代码

    属性| C / C ++构建|设置|调试|生成gcov信息(-ftest-coverage -fprofile-arcs)

    已启用

  • 可执行项目中的客户/测试代码

    还启用了生成gcov信息



从可执行项目运行程序,使用

分析工具|配置文件代码覆盖范围

工作正常,结果显示在 gcov 标签中,覆盖率信息(覆盖率%) 来自位于可执行项目以及静态库项目中的所有源代码文件。

在检查来自可执行项目的源文件时,颜色突出显示工作正常,但对于驻留在静态库项目中的源文件却根本不起作用-即完全不突出显示

我在Linux和Linux上都尝试过Windows:行为相同

在早期版本的eclipse-cpp中,如Juno(4.2)和Kepler(4.3),突出显示可以很好地用于静态库中的源文件。


有什么线索吗?

解决方案

有一个eclipse错误 https://bugs.eclipse.org/bugs/show_bug.cgi?id=439260 。我在火星 Neon 中也看到过这个问题。



如果有帮助,我尝试使用 lcov genhtml 代替日食可视化。


I'm using eclipse-cpp-luna-SR1 for both Linux and Windows with tool chain gcc 4.9.1
Code is partitioned into two projects:

  • Production code in a static library project
    Properties|C/C++ Build|Settings|Debugging|Generate gcov information (-ftest-coverage -fprofile-arcs)
    is enabled
  • Client/Test code in an executable project
    Also Generate gcov information is enabled

Running the program from the executable project with
Profiling Tools|Profile Code Coverage
works fine, and the result is presented in the gcov tab with coverage information (Coverage %) from all source code files residing in the executable project as well as the static library project.
When examining source files from executable project the color highlighting works fine, but not at all for the source files residing in the static library project - i.e., no highlighting at all!
I've tried out on both Linux as well as Windows: Same behavior
In previous versions of eclipse-cpp, like Juno (4.2) and Kepler (4.3), the highlighting works fine for source files in a static library.

Any clue?

解决方案

There is an eclipse bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=439260 regarding this. I have seen this issue in Mars and Neon as well.

In case it helps, I tried to use lcov and genhtml as an alternative to eclipse visualization.

这篇关于eclipse-cpp-luna-SR1中没有针对静态库项目的源代码覆盖颜色突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆