Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsEclipse, CDT, Cygwin: GCov panel shows zero values
https://www.eclipse.org/forums/index.php/mv/msg/286377/792101/#msg_792101
I use Eclipse Indigo on Windows, together with CDT 8.0, Cygwin 1.7.10-1 and Linux Tools labeled
GCov Integration (Incubation) 0.6.0.201201190007 org.eclipse.linuxtools.gcov.feature.group Eclipse Linux Tools
I use a very simple example to try out the features of the GCov plug-in:
#include <stdio.h>
int main (void)
{
int i;
for (i = 1; i < 10; i++)
{
if (i % 3 == 0)
printf ("%d is divisible by 3\n", i);
if (i % 11 == 0)
printf ("%d is divisible by 11\n", i);
}
return 0;
}
I compiled this code both with the --coverage or -fprofile-arcs -ftest-coverage options. Then I double-clicked on the gcno/gcda file and the GCov dialog opens up. I enter the correct path to the executable and select 'Show coverage details for ... only'. A nicely color coded editor window is presented as expected.
When I use the default setting however (Show coverage for the whole selected binary file), only zero values are shown.
Is this a bug or is it a feature? Do I do something wrong?
]]>Hans Meiser2012-02-06T16:05:18-00:00Re: Eclipse, CDT, Cygwin: GCov panel shows zero values
https://www.eclipse.org/forums/index.php/mv/msg/286377/792302/#msg_792302
It's certainly because gcov plugin is not able to find the gcno/gcda files produced by you binary. Check the eclipse error log: you will certainly found an entry saying something like "An error occured during analysis: unable to retrieve gcov data"
The way all gcda/gcno files are found by gcov plugin is currently not perfect.
For now, it depends on the external program "strings".
Is this program available on your Cygwin installation ?
Best regards,
Xavier Raynaud]]>Xavier Raynaud2012-02-06T21:28:01-00:00Re: Eclipse, CDT, Cygwin: GCov panel shows zero values
https://www.eclipse.org/forums/index.php/mv/msg/286377/797388/#msg_797388
thanks for your reply. I checked my cygwin installation and the strings program is available. It has version
GNU strings (GNU Binutils) 2.22.51.20111013
Furthermore I checked for an error like you described. I could not find any. I guess, the files must be found anyway, because the code back-annotation works well. It is just the summary, which does not work.
]]>Hans Meiser2012-02-13T12:28:09-00:00Re: Eclipse, CDT, Cygwin: GCov panel shows zero values
https://www.eclipse.org/forums/index.php/mv/msg/286377/800000/#msg_800000
I'm sorry, I was not able to reproduce with the following config:
- Windows 7
- eclipse Indigo
- CDT 8.0
- cygwin
- GNU strings (GNU Binutils) 2.22.51.20111013
Note: I've "C:\cygwin\bin" in system Path
Perhaps you can fill a bug, with a tar-ball of your project, and the content of the ".metadata/.log" file ?
]]>Xavier Raynaud2012-02-16T15:01:20-00:00