code coverage of inline function

喜欢而已 提交于 2019-12-11 19:32:58

问题


I have observed, in some of the my header file some of the functions are covered but some functions are not getting hit even if the function is called.

I have used the following options while compiling.

-fno-elide-constructors -O0 -fprofile-arcs -ftest-coverage -fno-inline -fno-inline-small-functions -fno-default-inline

I am not able to figure out why it is happening.

I am using gcc compiler and gcov.

example:

hpp

Class myclass
{

Myclass();

Getvalue();

};

0 Inline myclass::myclass()

0 {

0   .....

0 }

12 Inline myclass::getvalue()

12    {

12    .....

12   }

.cpp

12 Myclass abj1;

12 Obj1.getvalue();

I am using the following Gcov version v1.10, gcc version v4.4.5 and using it on Linux/EE50.

来源:https://stackoverflow.com/questions/18661078/code-coverage-of-inline-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!