public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* problem using GCOV
@ 2001-05-17 12:28 Bon Vipkone
  0 siblings, 0 replies; 3+ messages in thread
From: Bon Vipkone @ 2001-05-17 12:28 UTC (permalink / raw)
  To: gcc

Hi,

I have a problem with using GCOV.  I did gcov test on
C files that are existed on the server.  I ran the
server and ran the test.  Some files, I got the
percentage coverage and some not.  I've checked on the
ones that don't have the coverage information, did the
test again and the code did execute in those files but
still no coverage at all.  The files that were created
for all these files when I compiled with the GCOV
flags are .bb and .bbg.  The files that were created
after I ran the program are the .da files.  After I
test them with gcov command it created .gcov files. 
Any clue why some files not getting any coverage
information even though it is executed already? 
Thanks.




__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem using gcov
  2018-02-21 13:33 Problem using gcov Alexander Fichtinger
@ 2018-02-22  9:43 ` Martin Liška
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liška @ 2018-02-22  9:43 UTC (permalink / raw)
  To: Alexander Fichtinger, gcc

On 02/21/2018 02:33 PM, Alexander Fichtinger wrote:
> When you look at line 23 it is called 1 time. Line 24 is called 2 times (the bold one).
> We already looked in the disassembly but did not see a reason why the line should be executed 2 times.
> 
> Can anyone help here, please?
> 
> Kind regards,
> Alex

Hi.

Sure, can you please send a self-contained test-case that I can run?

Thank you,
Martin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Problem using gcov
@ 2018-02-21 13:33 Alexander Fichtinger
  2018-02-22  9:43 ` Martin Liška
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Fichtinger @ 2018-02-21 13:33 UTC (permalink / raw)
  To: gcc

Hi guys,

 
we have faced an error while using the gcov tool.

We have the following C-code:



    LC_TD_DINT caseSelector;

    caseSelector = LC_this->LC_VD_X;

    if ((caseSelector==(LC_TD_DINT)1L)||(caseSelector==(LC_TD_DINT)2L)||((caseSelector>=(LC_TD_DINT)33L) && (caseSelector<=(LC_TD_DINT)44L)))

    {

      LC_this->LC_VD_X = (LC_TD_INT)3;

      if ((LC_TD_BOOL)(LC_this->LC_VD_INPUT_VAR == (LC_TD_INT)2))

      {

        LC_this->LC_VD_Y = (LC_TD_INT)666;

      }

    }

    else

    {

      LC_this->LC_VD_X = (LC_TD_INT)4;

    }

 
 
 
 
 
When we use gcov (with options –bcfu) we got the following result (in the c.gcov file):

 
 
-:   19:    LC_TD_DINT caseSelector;

        1:   20:    caseSelector = LC_this->LC_VD_X;

        1:   21:    if ((caseSelector==(LC_TD_DINT)1L)||(caseSelector==(LC_TD_DINT)2L)||((caseSelector>=(LC_TD_DINT)33L) && (caseSelector<=(LC_TD_DINT)44L)))

branch  0 taken 1 (fallthrough)

branch  1 taken 0

branch  2 taken 0 (fallthrough)

branch  3 taken 1

branch  4 never executed

branch  5 never executed

branch  6 never executed

branch  7 never executed

        -:   22:    {

        1:   23:      LC_this->LC_VD_X = (LC_TD_INT)3;

        2:   24:      if ((LC_TD_BOOL)(LC_this->LC_VD_INPUT_VAR == (LC_TD_INT)2))

branch  0 taken 1 (fallthrough)

branch  1 taken 0

unconditional  2 taken 1

        -:   25:      {

        1:   26:        LC_this->LC_VD_Y = (LC_TD_INT)666;

unconditional  0 taken 1

        -:   27:      }

        -:   28:    }

        -:   29:    else

        -:   30:    {

    #####:   31:      LC_this->LC_VD_X = (LC_TD_INT)4;

unconditional  0 never executed

        -:   32:    }

 
 
 
 
 
When you look at line 23 it is called 1 time. Line 24 is called 2 times (the bold one).
We already looked in the disassembly but did not see a reason why the line should be executed 2 times.

Can anyone help here, please?

Kind regards,
Alex



 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-22  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17 12:28 problem using GCOV Bon Vipkone
2018-02-21 13:33 Problem using gcov Alexander Fichtinger
2018-02-22  9:43 ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).