Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » gcov plugin - Invalid binary file error(gcov plugin related question)
gcov plugin - Invalid binary file error [message #841033] Tue, 10 April 2012 20:37 Go to next message
Tamas Kleiber is currently offline Tamas KleiberFriend
Messages: 20
Registered: December 2010
Junior Member
Hello,

I'm trying to use the gcov eclipse plugin from the eclipse linuxtools group, under windows.

I successfully installed the gcov plugin v0.6.0.201203221532 under eclipse 3.7.2 with CDT 8.0.2

When I double click on one of the gcda or gcno files and select my win32/PE executable built using MinGW in the "Gcov - open coverage results..." dialogue box I get an error messing saying "Invalid binary file - xyz.exe is not a valid binary file."

Are only Linux executable files supported by this plugin? Or am I doing something wrong?
Re: gcov plugin - Invalid binary file error [message #842419 is a reply to message #841033] Thu, 12 April 2012 09:25 Go to previous messageGo to next message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
Hi,

The support for windows is limited.
It "should" work, but has not been heavily tested.

Is your computer 32bits or 64bits ?
Do you have any backtrace related to gcov in the <workspace>/.metadata/.log file ?

Re: gcov plugin - Invalid binary file error [message #848971 is a reply to message #842419] Wed, 18 April 2012 19:09 Go to previous messageGo to next message
Tamas Kleiber is currently offline Tamas KleiberFriend
Messages: 20
Registered: December 2010
Junior Member
Hello Xavier,

my operating system is a 32 bit Windows XP Professional SP3.

eclipse.buildId=M20120208-0800
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86


My .log file contains nothing related to gcov nor to the error messages I get.

Based on the source code this is the code snippet which fails, in OpenGCDialog::validateBinary():

IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(new Path(binValue));
if (binary == null) {


"binary" is null.

The path to my executable is "c:\workspace\gtest\bin\sample1_unittest.exe". The path should be correct as the file handle tells that my file exists.

I don't know if it matters or not but my executable is built using MinGW/GCC using the following command:

g++ -I./include -g -static -fprofile-arcs -ftest-coverage -Wall -Wextra -lpthread -lgcov bin/sample1.o bin/sample1_unittest.o bin/gtest_main.a -o ./bin/sample1_unittest
Re: gcov plugin - Invalid binary file error [message #889789 is a reply to message #848971] Tue, 19 June 2012 15:27 Go to previous messageGo to next message
Alex Mabry is currently offline Alex MabryFriend
Messages: 1
Registered: June 2012
Junior Member
I had the same problem, and I fixed it by changing my tool chain editor. I had mine set to Linux GCC, but I was using Cygwin. When I changed the toolchain to Cygwin GCC it worked.

Setting is Project Settings->C/C++ Build->Tool Chain Editor->Current Tool Chain
Re: gcov plugin - Invalid binary file error [message #889873 is a reply to message #889789] Wed, 20 June 2012 06:07 Go to previous message
Tamas Kleiber is currently offline Tamas KleiberFriend
Messages: 20
Registered: December 2010
Junior Member
Thank you Alex! This solved my issue too. You are a real life saver Smile
Previous Topic:noob trying to set up C++ IDE
Next Topic:1.0 released!
Goto Forum:
  


Current Time: Thu Apr 25 09:11:23 GMT 2024

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

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

Back to the top