I'm using LLVM Clang with Xcode and address sanitiser is not creating file:line report. I read the documentation and it says to run dsymutil on the binary before launching the app.

http://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports

I can achieve that by adding a run script build phase but it is clunky. To do the same with unix-makefiles I figured an install(SCRIPT <script.cmake>) would be better.

Is there a way to avoid all this and have Xcode run dsymutil as part of the build process, probably by a build setting that I don't know about ?

I've tried setting debugging information format to dwarf with dsym, but llvm-symbolizer doesn't use it. I guess that the difference is that dsymutil creates the .dsym file near the executable, inside the bundle :MyExec.dsym. While Xcode creates it outside the bundle: MyExec.app.dsym.

1

There are 1 answers

1
Jason Molenda On

In your Build Settings in Xcode, change the debug format from "DWARF" to "DWARF with dSYM".