0

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.

puio
  • 1,208
  • 6
  • 19

1 Answers1

0

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

Jason Molenda
  • 14,835
  • 1
  • 59
  • 61
  • That creates the dsym file, but I guess at the wrong place. Please see the edited question. llvm-symbolizer is not seeing the dsym file if it is away from the binary, near the bundle. – puio Oct 17 '20 at 13:21