Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - code coverage with QNX 6.3.2 with MIPS: (6 Items)
   
code coverage with QNX 6.3.2 with MIPS  
hi I am getting following error when i run gcov, please help us what is going wrong here.

Compiled sources with compiler version 2.95.3 with 

"  -Wc,-fprofile-arcs -Wc,-ftest-coverage" options and with and without linking option "-p" I am getting below error for
 any of the *.da files collected.

gcov versions details which I am currently runnning for the above issue is

1. GNU gcov version 1.5  - which is "ntomips-gcov OR ntomips-gcov-2.95.3"
2. gcov (GCC) 3.3.5 (qnx-nto) - which is (ntomips-gcov-3.3.5)

Hitting the issue.
============
The following files are present in the current directory
test.bb  test.bbg  test.c  test.da

and I am running below command and it says aborted, please help on this.
$usr/bin/ntomips-gcov-2.95.3 -f test.c
Aborted
$

Attachment: Text qnx_cov.txt 781 bytes
Re: code coverage with QNX 6.3.2 with MIPS  
Nagaraj naik wrote:
> and I am running below command and it says aborted, please help on this.
> $usr/bin/ntomips-gcov-2.95.3 -f test.c
> Aborted

This is a known issue. PR 21820. I've attached the patch for mipsbe. 
You'll have to update the libc.so.2 on the target as well as relink your 
executable to pull in the updated gmon.o/sample.o from libc.a.

Regards,

Ryan Mansfield


Attachment: Text mipsbe-libc-fix.tar.gz 1.02 MB
Re: code coverage with QNX 6.3.2 with MIPS  
thanks a lot it worked for gcov 2.95.3 version but for 3.3.5 version its giving same error, i would like to know is that
 same patch fixes with 3.3.5 as well?
or let me know if there is other patch of libc.so.2?

and also there is one more thing i would like to ask is
from past we are using the 2.95.3 compiler for the compilation of the our binary and after compile and linking it 
produces around 7.6 MB of size but when I just replace compiler version with 3.3.5 it produces 23MB of size all the 
flags and optimization remains same for both the compilation process, please let me know what causes it to produce so 
much of big chunk with 3.3.5 compiler?
Re: code coverage with QNX 6.3.2 with MIPS  
Nagaraj naik wrote:
> thanks a lot it worked for gcov 2.95.3 version but for 3.3.5 version its giving same error, i would like to know is 
that same patch fixes with 3.3.5 as well?
> or let me know if there is other patch of libc.so.2?

If you use the patch code coverage should work. It works for me with 
using both 2.95.3 and 3.3.5. Make sure you're using ntomips-gcov-2.95.3 
when you're compiling with 2.95.3, and ntomips-gcov-3.3.5 when you 
compile with gcc 3.3.5.

> and also there is one more thing i would like to ask is
> from past we are using the 2.95.3 compiler for the compilation of the our binary and after compile and linking it 
produces around 7.6 MB of size but when I just replace compiler version with 3.3.5 it produces 23MB of size all the 
flags and optimization remains same for both the compilation process, please let me know what causes it to produce so 
much of big chunk with 3.3.5 compiler?

It's pretty difficult to explain such an increase in size without taking 
a look at your binary and how you're compiling it. Keep in mind that 
even though you may be specifying the same optimization levels the 
underlying optimization passes enabled at those levels will be different 
between compiler versions.

Regards,

Ryan Mansfield
Re: code coverage with QNX 6.3.2 with MIPS  
I am doing a code coverage activity using gcov and lcov. In Linux we are able to generate the .bb and .bbg files during 
the cross compilation of the source file for a QNX specific (QNX 6.3.2) shle processor. The .da file was created 
successfully once we execute the executable”. But lcov command is not working. Its showing the error “ERROR: cannot 
read .gcno file. During compilation only .bb and .bbg files are getting created;no .gcno files are created. 

How I can use this .bb and .bbg files with lcov to generate the .info file. It will be great if you can help me ... 
Thanks, 
Avinash
Re: code coverage with QNX 6.3.2 with MIPS  
> I am doing a code coverage activity using gcov and lcov. In Linux we are able 
> to generate the .bb and .bbg files during the cross compilation of the source 
> file for a QNX specific (QNX 6.3.2) shle processor. The .da file was created 
> successfully once we execute the executable”. But lcov command is not working
> . Its showing the error “ERROR: cannot read .gcno file. During compilation 
> only .bb and .bbg files are getting created;no .gcno files are created. 
> 
> How I can use this .bb and .bbg files with lcov to generate the .info file. It
>  will be great if you can help me ... 

The reason this is not working for you is because the version of gcov that lcov is using does not match the code 
coverage version generated by toolchain you are using. .gnco code files were first introduced in gcc 3.4. QNX 6.3.2 
shipped with gcc 2.95.3 and 3.3.5, both of which generated .bb and .bbg files from -ftest-coverage. I'm not familiar 
with lcov but unless you're able to switch which version of gcov (either to ntosh-gcov or ntosh-gcov-3.3.5  depending on
 your compiler version) this won't be able to work.

Regards,

Ryan Mansfield