Actually, I believe gcov supports shared libraries, and I can genereate
.gcda and .gcon files for the library source. 

I can use the following command line to "see" the coverage data, file by
file. However, I'm looking for a easier way, (with GUI) to help me
navigate through. 

 

gcov -f Jmf.cpp -o . | c++filt > junk

vi junk

 

What it does in the command line is compare the cpp source with with the
generated data file (.gcno). I'm a bit confused why in Eclipse plug in
it's looking for gcno file and the executable file?

 

Any answer would be appreciated.

 

George

 

From: linuxtools-dev-boun...@eclipse.org
[mailto:linuxtools-dev-boun...@eclipse.org] On Behalf Of Xavier RAYNAUD
Sent: Thursday, September 23, 2010 12:14 AM
To: Linux Tools developer discussions
Subject: Re: [linuxtools-dev] gcov for library coverage?

 

Hi,

 

AFAIK, gcov does not support shared libraries (see for example
http://stackoverflow.com/questions/3709699/can-gcov-deal-with-shared-obj
ect/)

 

 

Best regards,

 

Xavier

 

From: linuxtools-dev-boun...@eclipse.org
[mailto:linuxtools-dev-boun...@eclipse.org] On Behalf Of George Liu
Sent: mercredi 22 septembre 2010 23:14
To: linuxtools-dev@eclipse.org
Subject: [linuxtools-dev] gcov for library coverage?

 

I'm developing a C++ library, and it's tested by a cppunit test program.

I wanted to use gcov to check for the library's code coverage, but is it
currently supported?

 

I added the -fprofile-arcs and -ftest-coverage flags to both the library
and the test program. What I can see is a beautiful chart showing me the
test program's coverage. But how do I see the coverage for my library
code?

 

When I select a .gcno file, and prompted for the binary file name,
selecting the library binary file will give me an error

An error has occurred when parsing the coverage data files :

Checksums don't correspond for _XXXXXX

 

Any clues?

Thanks

George

 

_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to