The crashlog command (actually a Python script) parses the crashlog, reads the UUID's for all the binaries from the images list at the end of the crash log, and then uses the "DebugSymbols" framework to locate the dSYM given the UUID. You can read more about how DebugSymbols works here: http://lldb.llvm.org/symbols.htmlJim
Today I had a problem getting crashlog to find the binaries. The last time, when it worked, the Application was run from, and crashed from, the /Applications directory and that path was buried in the crash report and so were the UUIDs and it found the debug symbols. At that time the version in /Applications was the same one that crashed.
Today I ran the exact same binary but I ran it from the archived build location because the one I have installed in /Applications has moved forwards and I wanted to reproduce the old crash again. That crash had the archived binary location from that run embedded in it, except that the home directory was anonymised to /Users/USER/.. The UUID on the binary however was exactly the same as before, because it really was the same binary.
However crashlog failed to load the symbols this time. The error was
Getting symbols for CDB41485-41C5-312E-B79F-19E9D3EC4F27 /Users/USER/Library/Developer/… error: unable to locate main executable (None) "/Users/USER/Library/Developer/Xcode/…
So it seems that the path buried in the crash log has to point to an executable or possibly the correct version of the executable before it will even get to the point of looking for the debug symbols by UUID.
That makes me wonder, what if you run crashlog on a normal /Applications/.. crash but the binary in your /Applications/.. directory is newer, which happens a lot, crash reports often come in ages late. Will crash log eventually load the correct binary, the one which goes with the debug symbols or will it load the wrong application binary and the right debug symbols and have a huge mismatch?
Better still, is there a way I can tell crashlog which actual binary it should load and where to find the debug symbols? I could go edit all the paths in the crash log to point to the archived app location but that seems a bit heavy. |