Enable GCOV Support In Android Source Code!!

1,441 views
Skip to first unread message

Prince

unread,
May 26, 2011, 6:14:02 AM5/26/11
to android-ndk
Hi All,

I want to enable GCOV Support in Android Source Code for all native
Applications.
And wants to generate HTML Report using LCOV Commands.

Currently, EMMA Support is present in Android Source Code.
Kindly help in enabling the GCOV in android source Code or provide any
pointers on this.

What I have analyzed is that if we use arm-eabi tool provided in ndk,
we cannot generate HTML reports using LCOV due to incompatibility
in .gcno files generated using ndk tool.

LCOV will work fine when we compile source files using the following
command "gcc -g -fprofile-arcs -ftest-coverage *.c".

Require your inputs, as I have to generate HTML Report for Android
Native Applications.

Thanks for your support.

Regards,
Pranjal

Carrot

unread,
May 31, 2011, 2:39:35 PM5/31/11
to android-ndk
Hi

.gcno file format changes with different versions of gcc. You need to
check if your LCOV support the version of your gcc.

thanks
Carrot

Nikolai Kondrashov

unread,
Jun 1, 2011, 4:15:53 AM6/1/11
to andro...@googlegroups.com, Prince
On 05/26/2011 01:14 PM, Prince wrote:
> What I have analyzed is that if we use arm-eabi tool provided in ndk,
> we cannot generate HTML reports using LCOV due to incompatibility
> in .gcno files generated using ndk tool.
We have successfully modified lcov to support android
toolchain-generated .gcno files and I can provide a patch. Which version
of gcc are you using?

Sincerely,
Nick

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Prince

unread,
Jun 8, 2011, 6:06:00 AM6/8/11
to android-ndk
Hi Nick,

We are using gcc 4.4.3 in Android.

It will be helpful for us in case some patch can be shared by you
along with the steps of usage.

We are working on Android 2.3 Version.

Regards,
Pranjal

vishakh

unread,
Nov 4, 2011, 11:44:19 AM11/4/11
to andro...@googlegroups.com

Hi

I am trying to use GCOV over ANDROID 2.3 with toolchain 4.4.3 . My .gcov files
are getting created but it says 0% executed .Please can you sendme the patch
for making GCOV work with android toolchain ???

I am using LOCAL_CFLAGS:= -fprofile-arcs -ftest-coverage
and LOCAL_STATIC_LIBRARIES := libcutils libc libgcov

thanks
vishakh

S. Kanthiraj Sudhaher

unread,
Jul 30, 2013, 6:42:44 AM7/30/13
to andro...@googlegroups.com
Dear Pranjal,

Can you please update me if are able to succeed in enabling GCOV support in android source?

I have enabled CFLAGS_GCOV in kernel and built the source. 

but linux boot is always failed, please update if you have some info.

Thanks,
Kanthiraj
Reply all
Reply to author
Forward
0 new messages