title: Why doesn't gcov report any lines being covered by my unit tests?
body: <p>I am using Xcode 3.2 on 10.6, with the shipped version of gcov and default GCC compiler (both version 4.2.1). I have created a dependent Cocoa unit test bundle which is injected into my app, and followed Apple's documentation on <a href="http://developer.apple.com/mac/library/qa/qa2007/qa1514.html" rel="noreferrer">setting up a gcov-instrumented build configuration</a> - based on the Debug configuration which doesn't have any compiler optimisations enabled.</p>
  <p>When I build the test bundle with this 'Gcov-instrumented' configuration, the app launches and the tests are injected and run. Also the coverage statistics files are generated at:</p>
  <blockquote>
  <p><code>build/&lt;AppTarget&gt;.build/Gcov-instrumented/&lt;AppTarget&gt;.build/Objects-normal/x86_64/&lt;object&gt;.gcda</code></p>
  <p><code>build/&lt;AppTarget&gt;.build/Gcov-instrumented/&lt;AppTarget&gt;.build/Objects-normal/x86_64/&lt;object&gt;.gcno</code></p>
  </blockquote>
  <p>So far so good. I know the tests are really being run because if I insert failures then the test suite fails as expected. Unfortunately, gcov reports that no lines of the objects have been covered by the tests! Every line is reported as 0 coverage. I've searched here and at the Apple mailing list archives, and can't find anyone with a similar problem. I expect I'm missing something - but what is it?</p>