gcov support for glibc
Palleti, Avinash Reddy
avinash.reddy.palleti@intel.com
Fri Jul 20 03:32:00 GMT 2018
Hi,
We are trying to get coverage analysis for glibc test cases, we tried below command to enable gcov support while building glibc.
CFLAGS="-ftest-coverage -fprofile-arcs -O2 -U_FORTIFY_SOURCE" CXXFLAGS="-ftest-coverage -fprofile-arcs" LD_FLAGS="-fprofile-arcs" ../configure --prefix=/opt/ --disable-werror libc_cv_ctors_header=yes libc_cv_c_cleanup=yes
With this configure line, "make tests" was giving segmentation fault with not much information in coredump. Then we realized that there is no support for gcov in glibc (https://sourceware.org/ml/libc-help/2017-09/msg00031.html)
There are suggestions to use oprofile but that just gives functional coverage, we are looking for line coverage.
Does anyone tried supporting gcov for glibc, if yes, please share the patches or give us pointers to work on the same.
Thanks,
Avinash
More information about the Libc-help
mailing list