FW: Re: Help needed with gcov

Sunil Kher sunilkher@hotmail.com
Thu Oct 20 17:24:00 GMT 2005


Here is the information I can provide.

The command like with which I am compiling the program (I am using a 
makefile) looks something like below.

g++ -g -pthreads   -fprofile-arcs -ftest-coverage -I- -I.   
-I/usr/openwin/include -I/opt/sybase/12.5/OCS-12_5/include  
-I/home/custom2/chronos/r30.0/gcovchr/build/include    
-I/home/execarch/include/30.0/current -I/opt/ScanBroker/include 
-I/opt/asn/5.0.3/include -I/opt/syncsort/include -I/opt/mqm/inc 
-I/opt/perf_3.75/include 
-I/home/execarch/tools/xerces/gnu/xerces-2.2/include 
-I/opt/bea/tuxedo8.1/include 
-I/home/custom2/chronos/r30.0/gcovchr/build/include 
-I/home/execarch/chronos/ea5.1/gnu/build/include   -D_GLIBCPP_USE_LONG_LONG 
-fPIC      -c chorCmRev.c -o chorCmRev.o


g++ -v -shared -pthreads  -o 
/home/custom2/chronos/r30.0/gcovchr/build/lib/libchorTransactionViewMaps.so 
chorCustInfoX_chorEventR.o chorCustInfoX_checSelEcR.o 
chorOriglFieldsX_chorEventR.o chorOriglDupChkFieldsX_chorEventR.o 
chorEventR_chorCustInfoX.o chorEventR_chorOriglFieldsX.o 
chorEventR_chorOriglDupChkFieldsX.o chorEventR_chorSelAutomationR.o 
chorEventR_chorUpdDeleteStatusR.o chorEventR_chorSelCustAddrInfoR.o 
chorEventR_chorUpdForNTCCR.o chorEventR_chorUpdBndItmPrcCdS.o 
chorEventR_chorInsOnlnChrgItmS.o chorEventR_chorSelOriginalProductR.o 
chorEventR_chorSelOriginalNonTransR.o chorEventR_chorSelPreviousR.o 
chorEventR_chorEventR.o chorEventR_chorSelNTPreviousR.o 
chorDeactivateS_chorEventR.o chorSelAutomationS_chorEventR.o 
chorUpdBndItmPrcCdS_chorEventR.o chorUpdDeleteStatusS_chorEventR.o 
chorUpdForCCAAS_chorEventR.o chorUpdForNTCCS_chorEventR.o 
chorUpdErrRevS_chorEventR.o chorUpdOriglShpmtS_chorEventR.o 
chorEventR_chorSelDupCheckR.o chorSelDupCheckS_chorEventR.o 
chorABChldShpDtlX_chorSelTransportationR.o chorEventR_chorABChldShpDtlX.o 
chorAirBillCmRev.o chorNRBMerge.o chorBrUpd.o chorCODRemittance.o chorCcaa.o 
chorCcad.o chorCmRev.o chorDlRev.o chorEcDel.o chorDeactivate.o chorEcRls.o 
chorEcScn.o chorEvent.o chorItemPrcsCode.o chorNRBRS.o chorNRBRU.o 
chorNtCca.o chorNtCcd.o chorNtRev.o chorNtEcDel.o chorNtEcRls.o chorRBDlt.o 
chorRBRls.o chorReplay.o chorScan.o chorTranDupCheck.o chorRebillRequest.o 
chorRebillRevenue.o chorRBDlq.o chorCmRevFactory.o chorChildAirbillScan.o 
chorScanFactory.o  /home/execarch/chronos/ea5.1/gnu/build/lib/eaVerInfo.o
Reading specs from 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: configure -prefix /home/execarch/tools/gcc-3.3.2/
Thread model: posix
gcc version 3.3.2
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/collect2 
-V -G -dy -z textoff -Y P,/usr/ccs/lib:/usr/lib -Qy -o 
/home/custom2/chronos/r30.0/gcovchr/build/lib/libchorTransactionViewMaps.so 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crti.o 
/usr/ccs/lib/values-Xa.o 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crtbegin.o 
-L/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2 
-L/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib 
-L/home/execarch/tools/gcc-3.3.2//lib/gcc-lib/sparc-sun-solaris2.8/3.3.2 
-L/usr/ccs/bin -L/usr/ccs/lib 
-L/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/../../.. 
-L/home/execarch/tools/gcc-3.3.2//lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/../../.. 
chorCustInfoX_chorEventR.o chorCustInfoX_checSelEcR.o 
chorOriglFieldsX_chorEventR.o chorOriglDupChkFieldsX_chorEventR.o 
chorEventR_chorCustInfoX.o chorEventR_chorOriglFieldsX.o 
chorEventR_chorOriglDupChkFieldsX.o chorEventR_chorSelAutomationR.o 
chorEventR_chorUpdDeleteStatusR.o chorEventR_chorSelCustAddrInfoR.o 
chorEventR_chorUpdForNTCCR.o chorEventR_chorUpdBndItmPrcCdS.o 
chorEventR_chorInsOnlnChrgItmS.o chorEventR_chorSelOriginalProductR.o 
chorEventR_chorSelOriginalNonTransR.o chorEventR_chorSelPreviousR.o 
chorEventR_chorEventR.o chorEventR_chorSelNTPreviousR.o 
chorDeactivateS_chorEventR.o chorSelAutomationS_chorEventR.o 
chorUpdBndItmPrcCdS_chorEventR.o chorUpdDeleteStatusS_chorEventR.o 
chorUpdForCCAAS_chorEventR.o chorUpdForNTCCS_chorEventR.o 
chorUpdErrRevS_chorEventR.o chorUpdOriglShpmtS_chorEventR.o 
chorEventR_chorSelDupCheckR.o chorSelDupCheckS_chorEventR.o 
chorABChldShpDtlX_chorSelTransportationR.o chorEventR_chorABChldShpDtlX.o 
chorAirBillCmRev.o chorNRBMerge.o chorBrUpd.o chorCODRemittance.o chorCcaa.o 
chorCcad.o chorCmRev.o chorDlRev.o chorEcDel.o chorDeactivate.o chorEcRls.o 
chorEcScn.o chorEvent.o chorItemPrcsCode.o chorNRBRS.o chorNRBRU.o 
chorNtCca.o chorNtCcd.o chorNtRev.o chorNtEcDel.o chorNtEcRls.o chorRBDlt.o 
chorRBRls.o chorReplay.o chorScan.o chorTranDupCheck.o chorRebillRequest.o 
chorRebillRevenue.o chorRBDlq.o chorCmRevFactory.o chorChildAirbillScan.o 
chorScanFactory.o /home/execarch/chronos/ea5.1/gnu/build/lib/eaVerInfo.o 
-lstdc++ -lm -lgcc_s -lgcc_s 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crtend.o 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.297
g++ -v -shared -pthreads  -o 
/home/custom2/chronos/r30.0/gcovchr/build/lib/libchorEvent.so 
chorCustInfoX_chorEventR.o chorCustInfoX_checSelEcR.o 
chorOriglFieldsX_chorEventR.o chorOriglDupChkFieldsX_chorEventR.o 
chorEventR_chorCustInfoX.o chorEventR_chorOriglFieldsX.o 
chorEventR_chorOriglDupChkFieldsX.o chorEventR_chorSelAutomationR.o 
chorEventR_chorUpdDeleteStatusR.o chorEventR_chorSelCustAddrInfoR.o 
chorEventR_chorUpdForNTCCR.o chorEventR_chorUpdBndItmPrcCdS.o 
chorEventR_chorInsOnlnChrgItmS.o chorEventR_chorSelOriginalProductR.o 
chorEventR_chorSelOriginalNonTransR.o chorEventR_chorSelPreviousR.o 
chorEventR_chorEventR.o chorEventR_chorSelNTPreviousR.o 
chorDeactivateS_chorEventR.o chorSelAutomationS_chorEventR.o 
chorUpdBndItmPrcCdS_chorEventR.o chorUpdDeleteStatusS_chorEventR.o 
chorUpdForCCAAS_chorEventR.o chorUpdForNTCCS_chorEventR.o 
chorUpdErrRevS_chorEventR.o chorUpdOriglShpmtS_chorEventR.o 
chorEventR_chorSelDupCheckR.o chorSelDupCheckS_chorEventR.o 
chorABChldShpDtlX_chorSelTransportationR.o chorEventR_chorABChldShpDtlX.o 
chorAirBillCmRev.o chorNRBMerge.o chorBrUpd.o chorCODRemittance.o chorCcaa.o 
chorCcad.o chorCmRev.o chorDlRev.o chorEcDel.o chorDeactivate.o chorEcRls.o 
chorEcScn.o chorEvent.o chorItemPrcsCode.o chorNRBRS.o chorNRBRU.o 
chorNtCca.o chorNtCcd.o chorNtRev.o chorNtEcDel.o chorNtEcRls.o chorRBDlt.o 
chorRBRls.o chorReplay.o chorScan.o chorTranDupCheck.o chorRebillRequest.o 
chorRebillRevenue.o chorRBDlq.o chorCmRevFactory.o chorChildAirbillScan.o 
chorScanFactory.o  /home/execarch/chronos/ea5.1/gnu/build/lib/eaVerInfo.o
Reading specs from 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: configure -prefix /home/execarch/tools/gcc-3.3.2/
Thread model: posix
gcc version 3.3.2
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/collect2 
-V -G -dy -z textoff -Y P,/usr/ccs/lib:/usr/lib -Qy -o 
/home/custom2/chronos/r30.0/gcovchr/build/lib/libchorEvent.so 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crti.o 
/usr/ccs/lib/values-Xa.o 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crtbegin.o 
-L/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2 
-L/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib 
-L/home/execarch/tools/gcc-3.3.2//lib/gcc-lib/sparc-sun-solaris2.8/3.3.2 
-L/usr/ccs/bin -L/usr/ccs/lib 
-L/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/../../.. 
-L/home/execarch/tools/gcc-3.3.2//lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/../../.. 
chorCustInfoX_chorEventR.o chorCustInfoX_checSelEcR.o 
chorOriglFieldsX_chorEventR.o chorOriglDupChkFieldsX_chorEventR.o 
chorEventR_chorCustInfoX.o chorEventR_chorOriglFieldsX.o 
chorEventR_chorOriglDupChkFieldsX.o chorEventR_chorSelAutomationR.o 
chorEventR_chorUpdDeleteStatusR.o chorEventR_chorSelCustAddrInfoR.o 
chorEventR_chorUpdForNTCCR.o chorEventR_chorUpdBndItmPrcCdS.o 
chorEventR_chorInsOnlnChrgItmS.o chorEventR_chorSelOriginalProductR.o 
chorEventR_chorSelOriginalNonTransR.o chorEventR_chorSelPreviousR.o 
chorEventR_chorEventR.o chorEventR_chorSelNTPreviousR.o 
chorDeactivateS_chorEventR.o chorSelAutomationS_chorEventR.o 
chorUpdBndItmPrcCdS_chorEventR.o chorUpdDeleteStatusS_chorEventR.o 
chorUpdForCCAAS_chorEventR.o chorUpdForNTCCS_chorEventR.o 
chorUpdErrRevS_chorEventR.o chorUpdOriglShpmtS_chorEventR.o 
chorEventR_chorSelDupCheckR.o chorSelDupCheckS_chorEventR.o 
chorABChldShpDtlX_chorSelTransportationR.o chorEventR_chorABChldShpDtlX.o 
chorAirBillCmRev.o chorNRBMerge.o chorBrUpd.o chorCODRemittance.o chorCcaa.o 
chorCcad.o chorCmRev.o chorDlRev.o chorEcDel.o chorDeactivate.o chorEcRls.o 
chorEcScn.o chorEvent.o chorItemPrcsCode.o chorNRBRS.o chorNRBRU.o 
chorNtCca.o chorNtCcd.o chorNtRev.o chorNtEcDel.o chorNtEcRls.o chorRBDlt.o 
chorRBRls.o chorReplay.o chorScan.o chorTranDupCheck.o chorRebillRequest.o 
chorRebillRevenue.o chorRBDlq.o chorCmRevFactory.o chorChildAirbillScan.o 
chorScanFactory.o /home/execarch/chronos/ea5.1/gnu/build/lib/eaVerInfo.o 
-lstdc++ -lm -lgcc_s -lgcc_s 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crtend.o 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.297


All these and a lot more shared libraries then get linked into a library 
package which then is used to build a tuxedo server.

When I boot up the tux server, run some uds and then shut down the tux 
server, I get .da files for a lot of source code files.

/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc> ls 
*.da
chorDBFuncs.da                            chorInsPkgEventHistS_chorEventS.da
chorDBIntfcContainer.da                   chorInsPkgSpclHndlgS_chorEventR.da
chorEventR_chorInsPkgEventHistR.da        chorInsRemittanceS_chorEventR.da
chorEventR_chorSelCustAddrInfoR.da        
chorInsTransportationS_chorEventR.da
chorEventR_chorSelNonBillChrgR.da         chorNonBillCharge.da
chorEventR_chorSelNonTransAllR.da         chorNonTransportation.da
chorEventR_chorSelNonTransStatR.da        chorNonTransportationStat.da
chorEventR_chorSelOnlnChrgItmR.da         chorOnlineChargeItem.da
chorEventR_chorSelOnlnPkgStatR.da         chorOnlinePackageStat.da
chorEventR_chorSelOnlnRevItmPrflR.da      chorOnlineReferenceNote.da
chorEventR_chorSelOrigShpSpcHdlR.da       chorOnlineRevenueItemPrfl.da
chorEventR_chorSelOriginalProductR.da     chorOnlnCustAddrInfo.da
chorEventR_chorSelPkgSpclHndlgR.da        chorOrigShpSpclHndlg.da
chorEventR_chorSelRevItemRefNoteR.da      chorOriginalProduct.da
chorEventR_chorSelRevPriceOptR.da         chorPkgSpclHndlg.da
chorEventR_chorSelTransportationR.da      chorRevenuePricingOption.da
chorInsNonBillChrgS_chorEventR.da         chorStatCode.da
chorInsNonTransAllS_chorEventR.da         chorTransportation.da
chorInsNonTransEventHistS_chorEventR.da   chorUpdBndItmPrcCdS_chorEventR.da
chorInsOnlnRevItmPrflS_chorEventR.da      chorUpdNonBillChrgS_chorEventR.da
chorInsOrigShpSpcHdlS_chorEventR.da       chorUpdNonTransAllS_chorEventR.da
chorInsOriginalProductS_chorEventR.da     chorUpdPkgSpclHndlgS_chorEventR.da
chorInsPkgEventHistS_chorEventR.da        
chorUpdTransportationS_chorEventR.da
/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc>



But this does not happen for all the source code e.g. the directory for 
which I showed you the command line g++ above, there are no .da file 
generated. Very much similar Imakefiles are being used to compile the entire 
project.

In any case, when I run gcov like below, the output is shown.


/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc> gcov 
chorStatCode.c
0.00% of 3 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_vector.h
Creating stl_vector.h.gcov.
0.00% of 10 lines executed in file 
/home/execarch/chronos/ea5.1/gnu/build/include/eaSingleton.h
Creating eaSingleton.h.gcov.
0.00% of 1 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/new
Creating new.gcov.
0.00% of 4 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_construct.h
Creating stl_construct.h.gcov.
0.00% of 1 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/basic_string.h
Creating basic_string.h.gcov.
0.00% of 3 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_function.h
Creating stl_function.h.gcov.
0.00% of 2 lines executed in file 
/home/execarch/chronos/ea5.1/gnu/build/include/eaGlobals.h
Creating eaGlobals.h.gcov.
0.00% of 14 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/list.tcc
Creating list.tcc.gcov.
0.00% of 15 lines executed in file 
/home/custom2/chronos/r30.0/gcovchr/build/include/chorUpdNonTransStatv.h
Creating chorUpdNonTransStatv.h.gcov.
0.00% of 15 lines executed in file 
/home/custom2/chronos/r30.0/gcovchr/build/include/chorInsNonTransStatv.h
Creating chorInsNonTransStatv.h.gcov.
0.00% of 15 lines executed in file 
/home/custom2/chronos/r30.0/gcovchr/build/include/chorSelNonTransStatv.h
Creating chorSelNonTransStatv.h.gcov.

|
|
|

100.00% of 1 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/iostream
Creating iostream.gcov.
0.00% of 150 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_tree.h
Creating stl_tree.h.gcov.
0.00% of 7 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_alloc.h
Creating stl_alloc.h.gcov.
0.00% of 40 lines executed in file 
/home/custom2/chronos/r30.0/gcovchr/build/include/chorDBUtils.h
Creating chorDBUtils.h.gcov.
0.00% of 2 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_pair.h
Creating stl_pair.h.gcov.
20.00% of 5 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_set.h
Creating stl_set.h.gcov.
0.00% of 42 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/bits/stl_list.h
Creating stl_list.h.gcov.
0.00% of 121 lines executed in file 
/home/custom2/chronos/r30.0/gcovchr/build/include/chorDBIntfc.h
Creating chorDBIntfc.h.gcov.
0.00% of 154 lines executed in file chorStatCode.c
Creating chorStatCode.c.gcov.
0.00% of 12 lines executed in file 
/home/execarch/tools/gcc-3.3.2/include/c++/3.3.2/sparc-sun-solaris2.8/bits/atomicity.h
Creating atomicity.h.gcov.
/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc>


My problem is that

1. It did not generate the .da files for each source code file compiled with 
fprofile-arcs and ftest-coverage option.
2. It says 0% of the code was executed for most of my source code files. 
However, the tux server does output some results looking at which I know 
that a particular line got executed even though gcov says it has not.

/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc> gcov
Usage: gcov [OPTION]... SOURCEFILE

Print code coverage information.

  -h, --help                      Print this help, then exit
  -v, --version                   Print version number, then exit
  -b, --branch-probabilities      Include branch probabilities in output
  -c, --branch-counts             Given counts of branches taken
                                    rather than percentages
  -n, --no-output                 Do not create an output file
  -l, --long-file-names           Use long output file names for included
                                    source files
  -f, --function-summaries        Output summaries for each function
  -o, --object-directory DIR|FILE Search for object files in DIR or called 
FILE
  -p, --preserve-paths            Preserve all pathname components

For bug reporting instructions, please see:
<URL:http://gcc.gnu.org/bugs.html>.
/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc> gcov 
-v
gcov (GCC) 3.3.2
Copyright (C) 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc>



/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc> g++ -v
Reading specs from 
/home/execarch/tools/gcc-3.3.2/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: configure -prefix /home/execarch/tools/gcc-3.3.2/
Thread model: posix
gcc version 3.3.2
/home/custom2/chronos/r30.0/gcovchr/src/ore/lib/dbInterfaces/DBIntfc>


<BLOCKQUOTE style='PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #A0C6E5 
2px solid; MARGIN-RIGHT: 0px'><font 
style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'><hr color=#A0C6E5 
size=1>
From:  <i>Nathan Sidwell <nathan@codesourcery.com></i><br>To:  
<i>Sunil Kher <sunilkher@hotmail.com></i><br>CC:  
<i>gcc-help@gcc.gnu.org</i><br>Subject:  <i>Re: Help needed with 
gcov</i><br>Date:  <i>Thu, 20 Oct 2005 17:28:33 +0100</i><br>MIME-Version:  
<i>1.0</i><br>Received:  <i>from mail.codesourcery.com ([65.74.133.11]) by 
MC6-F23.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 20 Oct 2005 
09:28:45 -0700</i><br>Received:  <i>(qmail 12549 invoked from network); 20 
Oct 2005 16:28:39 -0000</i><br>Received:  <i>from unknown (HELO 
?192.168.189.167?) (nathan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 
20 Oct 2005 16:28:39 -0000</i><br>>Sunil Kher wrote:<br>>>Hey, 
Thanx for the response. What extra information should I <br>>>provide? 
I will try to provide you everything that you ask for. <br>>>Also, 
what is the latest version of gcov and where can I get it? 
<br>>>Thanx, Sunil.<br>><br>>Please cc the gcc list.  gcov is 
part of gcc, so the latest version <br>>will be with the 4.0.2 gcc 
release.  In order to help further your <br>>going to have to show how 
you compiled and linked your program.  <br>>what system you are running 
on.  You indicate that a simple test <br>>case doesn't 
work.<br>><br>>nathan<br>>><br>>><BLOCKQUOTE 
style='PADDING-LEFT: 5px; MARGIN-LEFT: 5px; <br>>>BORDER-LEFT: #A0C6E5 
2px solid; MARGIN-RIGHT: 0px'><font 
<br>>>style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'><hr 
<br>>>color=#A0C6E5 size=1><br>>>From:  <i>Nathan 
Sidwell &lt;nathan@codesourcery.com&gt;</i><br>To: 
<br>>>  <i>Sunil Kher 
&lt;sunilkher@hotmail.com&gt;</i><br>CC:  
<br>>><i>help-gcc@gnu.org</i><br>Subject:  
<i>Re: Help needed with <br>>>gcov</i><br>Date:  
<i>Thu, 20 Oct 2005 15:53:36 
<br>>>+0100</i><br>MIME-Version:  
<i>1.0</i><br>Received:  <i>from 
<br>>>mail.codesourcery.com ([65.74.133.11]) by MC8-F24.hotmail.com 
with <br>>>Microsoft SMTPSVC(6.0.3790.211); Thu, 20 Oct 2005 07:53:42 
<br>>>-0700</i><br>Received:  <i>(qmail 5325 invoked 
from network); 20 <br>>>Oct 2005 14:53:42 
-0000</i><br>Received:  <i>from unknown (HELO 
<br>>>?192.168.189.167?) (nathan@127.0.0.2) by mail.codesourcery.com 
with <br>>>ESMTPA; 20 Oct 2005 14:53:42 
-0000</i><br>&gt;Sunil Kher 
<br>>>wrote:<br>&gt;&gt;Hi, does any one know where can 
I get some help <br>>>with the code <br>&gt;&gt;coverage 
tool gcov? The problems I have <br>>>are a 
couple.<br>&gt;&gt;<br>&gt;&gt;1. .da files are 
not generated <br>>>for each source code file compiled 
<br>&gt;&gt;with -fprofile-arcs <br>>>-ftest-coverage 
options but only for some.<br>&gt;&gt;2. Even for 
<br>>>the ones where .da files are generated, gcov states 
<br>>><br>&gt;&gt;that none of the code was executed 
when I can see that <br>>>some <br>&gt;&gt;particular 
lines were executed. e.g. cout &lt;&lt; <br>>>&quot;Hello 
World&quot; will <br>&gt;&gt;show me the output but 
<br>>>gcov will state that the line was never 
<br>>><br>&gt;&gt;executed.<br>&gt;&gt;<br>&gt;&gt;Do 
you know where I <br>>>can find some 
help?<br>&gt;&gt;<br>&gt;&gt;Thanx, 
<br>>>Sunil.<br>&gt;&gt;407-916-3521.<br>&gt;&gt;<br>&gt;&gt;PS: 
The <br>>>version I am using for gcov is 1.5 and gcc version is 
<br>>><br>&gt;&gt;2.95.3 20010315 (release) running on 
<br>>>Sun-Solaris.<br>&gt;<br>&gt;There is too 
little information here to <br>>>give specific suggestions.  
<br>&gt;However, if it turns out that <br>>>gcov is buggy 
(as opposed to just <br>&gt;being invoked 
<br>>>incorrectly), it will not be fixed.  To get a fix, 
<br>&gt;you'll <br>>>need to update to a much more recent 
<br>>>release.<br>&gt;<br>&gt;nathan<br>&gt;--<br>&gt;Nathan 
Sidwell    <br>>>::   http://www.codesourcery.com   ::     
<br>&gt;CodeSourcery 
<br>>>LLC<br>&gt;nathan@codesourcery.com    ::     
<br>>><br>&gt;http://www.planetfall.pwp.blueyonder.co.uk<br>&gt;<br></font></BLOCKQUOTE><br>>><br>>><br>>><br>><br>><br>>--<br>>Nathan 
Sidwell    ::   http://www.codesourcery.com   ::     <br>>CodeSourcery 
LLC<br>>nathan@codesourcery.com    ::     
<br>>http://www.planetfall.pwp.blueyonder.co.uk<br>><br></font></BLOCKQUOTE>




More information about the Gcc-help mailing list