[cfe-users] Generating debug symbol data for lldb on OSX 10.11 (Solved)

Ross Inglis via cfe-users cfe-users at lists.llvm.org
Sat Jun 4 02:05:34 PDT 2016


OK. I was poking around using the '-v' option to 'clang' to try and work 
out which linker was actually
being used. It pointed me at the right toolchain folder, where I found 
the magic command 'dsymutil'.

This looked interesting, especially when I checked out the man page.

So I ran it, and got a huge folder full of output that seems to give 
lldb what it needs.

So for non-Mac types (like me)...

You need to run a post-link step... Simply run 'dsymutil' on the final 
executable (or dylib). It should
build a folder ('bundle' in Mac-speak) with the debug symbol data in it.

I wasn't sure where to put the resulting XXXX.dSym folder on the target 
machine, but simply copying
it alongside the binary seems to do the job.

Personally, I'd prefer to keep debug symbol data embedded (less chance 
of mislaying it). But I'm happy
as long as the debugger works!

Ross.



More information about the cfe-users mailing list