gcov unable to dump coverage of shared library

2008 ramrao.gd@gmail.com
Thu Oct 15 16:28:00 GMT 2009


Hi Aditya,

I am aslo having same scenario. Gcov is not generating *gcno and *.gcda upon
compilation.

Any hints?

Thanks,
Ram

aditya tiwari wrote:
> 
> Opps ,
> 
> It seams that gcov has some issues to dump coverage of shared libraries.
> 
> I compiled using  following ....
> 
> gcc  -rdynamic -fPIC  -fprofile-arcs -ftest-coverage -c -o shared.o
> shared.c
> ld -shared shared.o /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgcov.a
> /usr/lib/x86_64-redhat-linux3E/lib64/libc.so -o shared.so
> 
> but no   shared.gcda  was generated for the shared.c
> and got coverage information only for main binary only to which
> shared.so was linked.
> 
> Can some one please suggest how to do code coverage for shared libraries.
> 
> regards
> aditya
> 
> 

-- 
View this message in context: http://www.nabble.com/gcov-unable-to-dump-coverage-of-shared-library-tp17423886p25911806.html
Sent from the Sourceware - binutils list mailing list archive at Nabble.com.



More information about the Binutils mailing list