Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Eclipse, CDT, Cygwin: GCov panel shows zero values(Eclipse, CDT, Cygwin: GCov panel shows zero values)
Eclipse, CDT, Cygwin: GCov panel shows zero values [message #792101] Mon, 06 February 2012 16:05 Go to next message
Hans Meiser is currently offline Hans MeiserFriend
Messages: 2
Registered: February 2012
Junior Member
Hi,

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.

index.php/fa/7035/0/


When I use the default setting however (Show coverage for the whole selected binary file), only zero values are shown.


index.php/fa/7036/0/

Is this a bug or is it a feature? Do I do something wrong?
  • Attachment: color.jpg
    (Size: 20.78KB, Downloaded 3177 times)
  • Attachment: gcovsum.jpg
    (Size: 17.70KB, Downloaded 2613 times)

[Updated on: Mon, 06 February 2012 16:23]

Report message to a moderator

Re: Eclipse, CDT, Cygwin: GCov panel shows zero values [message #792302 is a reply to message #792101] Mon, 06 February 2012 21:28 Go to previous messageGo to next message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
Hi,

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
Re: Eclipse, CDT, Cygwin: GCov panel shows zero values [message #797388 is a reply to message #792302] Mon, 13 February 2012 12:28 Go to previous messageGo to next message
Hans Meiser is currently offline Hans MeiserFriend
Messages: 2
Registered: February 2012
Junior Member
Hi Xavier,

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.
Re: Eclipse, CDT, Cygwin: GCov panel shows zero values [message #800000 is a reply to message #797388] Thu, 16 February 2012 15:01 Go to previous message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
Hi Hans,

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 ?
Previous Topic:Problem with OPofiler in Ubuntu
Next Topic:CTF Status?
Goto Forum:
  


Current Time: Fri Apr 19 04:27:22 GMT 2024

Powered by FUDForum. Page generated in 0.01868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top