[PATCH] D142283: [Support] Make llvm-symbolizer runs for stack traces work on Apple platforms

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 18:54:49 PST 2023


aprantl added inline comments.


================
Comment at: llvm/lib/Support/Signals.cpp:227
+        Args.push_back("--dsym-hint");
+        Args.push_back(DSymHintArgs.back());
+      }
----------------
aprantl wrote:
> dblaikie wrote:
> > aprantl wrote:
> > > The correct way of locating dSYMs on macOS is to run `mdfind` with the UUID of binary (e.g., https://github.com/llvm/llvm-project/blob/b40bfc1b9e389c154f6c60550dfc010ff8b3658f/lldb/examples/python/crashlog.py#L303).  The UUID can be extracted with `dwarfdump --uuid` for example.
> > Does that cover the non-dsym case (debugging/symbolizing from raw .o files) too?
> No, this is strictly for finding .dSYM bundles. The official way of symbolicating on macOS is to use the CoreSymbolication framework which hides all these details and is exposed through tools like `atos`. (That's how the sanitizer runtime does it for example). The other option is to call into LLDB.framework using its public API, but that needs developer tools to be installed on the system.
https://lldb.llvm.org/use/symbolication.html
https://lldb.llvm.org/use/symbols.html

So technically in addition to running mdfind you'd then also need to run any script in `com.apple.DebugSymbols.DBGShellCommands` ...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142283/new/

https://reviews.llvm.org/D142283



More information about the llvm-commits mailing list