This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcov for assembly
- From: Holger Blasum <hbl at sysgo dot com>
- To: ravi s <ravipwm at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Tue, 12 Oct 2010 19:08:33 +0200
- Subject: Re: gcov for assembly
- References: <AANLkTimzJ4ur2V+8K+GeJ1bHSUjsxywHF8e2+PsG3vRO@mail.gmail.com> <AANLkTimupcMm3VzaS0LCjyO3p47k+nd-ZX5P9wYZ4WvR@mail.gmail.com>
Dear Ravi,
On Mon, Oct 11, 2010 at 11:56:33AM +0530, ravi s wrote:
> > ÂIs there a way to get the assembly code coverage just like we have it for source code like C/C++/Fortran ?
> > Â-fprofile-arcs -ftest-coverage doesn't seem to work with assembly (*.S) files.
Iirc the gcc approach is instrumenting the basic blocks *before* assembly
generation. Nonetheless, the data format evaluated by gcov could also
be generated by instrumentation of assembly. At least some people
had academically experimented into that direction (Fei Xun,
Luo Lei, 2004, "Implementation of assembler program
coverage testing with GNU tool", Computer Applications,
ISSN 1001-9801, e.g.
http://en.cnki.com.cn/Article_en/CJFDTOTAL-JSJY200412033.htm ).
hth,
--
Holger Blasum (SYSGO AG)