Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLDB How to load crashlog

Tags:

xcode

ios

lldb

I'm studying iOS crash analysis. Now, I need to import crashlog files into LLDB. As WWDC18 Session 414 said, I now have a copy of myApp, dSYM, xxx.crash. Run the following command in iTerm2.app:

$ lldb
(lldb) command script import lldb.macosx.crashlog
(lldb) crashlog /path/xxxx.crash

However, the stack trace file is not available and there is only a lot of error like:

error: unable to locate any executables from the crash log

Did I use it wrong? What is the correct method of use?

like image 230
Leo.J Avatar asked Oct 14 '18 03:10

Leo.J


1 Answers

I've recently had the same issue. Unfortunately, in it's current state the crashlog script appears to expect the original binary to be around, but we can "trick" it by either:

  1. Copying the binary from inside the .dSYM/Contents/Resources/DWARF/ into the path it is expecting it (found on the .crash file, something like /private/var/containers/Bundle/Application/SOME-UUID/MyApp.app/MyApp)

  2. Editing the paths (not just the initial one) in the .crash file before symbolicating to the path of the binary (e.g. ~/MyFolder/MyApp.app/...).

Hope this helps! 🙏

like image 194
André Neves Avatar answered Oct 13 '22 20:10

André Neves