4

I compiled my source files with gcov flags on a remote server.

CFLAGS += -fprofile-arcs -ftest-coverage -lgcov -coverage

Compilation works fine. gcc 4.7 was used for compilation. .gcno file generated has 407* format. all functions works fine. i get coverage report using gcov main.c

Now i am trying get coverage data, in my local system which has gcc version 4.1.2

I get segmentation fault.

Error:

main.gcno:version `407*', prefer 401p'
Segmentation fault (core dumped)

Does version of gcc is the reason for this? Why am i getting segmentation fault? What are the changes made in the new gcc. What are possible solutions? ( I cant update gcc)

Any suggestions would be helpful..

ssh99
  • 309
  • 1
  • 3
  • 16

1 Answers1

5

Seems like different versions of gcov are not compatible and there is no backward compatibility. Just upgraded gcc to 4.7 and everything works just fine.

ssh99
  • 309
  • 1
  • 3
  • 16