• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Question about gcov in Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Question about gcov in Xcode


  • Subject: RE: Question about gcov in Xcode
  • From: Yongqiang <email@hidden>
  • Date: Wed, 27 Aug 2008 22:16:35 +0000
  • Importance: Normal

I think it is not caused by the setting of Xcode. In foo(), if a=1, it only coverge half code of the program, thus, its coverage is 50%. Actually, if a= -1, another half code is covered. If i can run program two times with a=1 and a =-1, make the code coveraged logic "and", that is the real coverage rate.

YQ



CC: email@hidden
From: email@hidden
To: email@hidden
Subject: Re: Question about gcov in Xcode
Date: Wed, 27 Aug 2008 15:06:05 -0700

Hi!

I've never used gcov, but as a shot in the dark, its man page says that gcov requires all compiler optimization to be off for it to function properly.  Do you have all optimizations turned off?

Cheers,
Andrew

On Aug 27, 2008, at 2:40 PM, Yongqiang wrote:

Hi,

I know how to set Xcode to use gcov. My question is if one program like this:

foo()
{
   if (a>0)
 {a = 1;}
   else
 {a =0;}
}

If use gcov, the coverage is 50%. Actually, its coveage should be 100%.  How can i use gcov in Xcode to get the correct result?

YQ



Windows Live Writer,支持离线撰写博客内容,随时随地想写就写。 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Question about gcov in Xcode (From: Yongqiang <email@hidden>)
 >Re: Question about gcov in Xcode (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: IB 3.1 Carbon group box weirdness
  • Next by Date: Re: XCode will not debug
  • Previous by thread: Re: Question about gcov in Xcode
  • Next by thread: Re: Question about gcov in Xcode
  • Index(es):
    • Date
    • Thread