Xcode 4 Instruments doesn't show source lines

2020-05-13 16:15发布

I've just started playing with Xcode 4, and found that, no matter how I setup debugging symbols in the project, Instruments refuses to display source lines for stack trace items that correspond to my code. In only shows hex offsets and identifies my executable as the owning module. Turning on "Source Location" draws a blank too. This occurs even for the skeleton OpenGL ES project generated by Xcode (File → New → New Project... → iOS → Application → OpenGL ES Application).

This problem only occurs in Instruments (I've tried CPU and OpenGL tracing so far). Gdb picks up debug symbols just fine.

Do I have to do something special to see the source code for stack traces in Instruments, or is this a bug in Xcode 4?

So far, I've:

  • Changed Debug Information Format from DWARF with dSYM File to DWARF.
  • Changed Strip Debug Symbols During Copy from Yes to No.
  • Changed the build scheme to use the Debug build instead of the Release build with Instruments.

8条回答
▲ chillily
2楼-- · 2020-05-13 16:43

It just started working; no rhyme or reason.

I have spent the last half-hour trying to get it to fail again, in the hope of providing a more useful answer here, but I can't, even after recreating the skeleton OpenGL program from scratch, retracing all of my steps.

I did open the symbolicatecrash script in emacs (It has been implicated elsewhere, wrt this kind of problem), and it started working after I did this. But at no point did I change or save it.

It's a mystery.

查看更多
啃猪蹄的小仙女
3楼-- · 2020-05-13 16:50

Try selecting a different code signing identity, i.e. provisioning profile, for the Release configuration.

查看更多
登录 后发表回答