[Lldb-commits] [PATCH] D91130: [crashlog] Implement parser for JSON encoded crashlogs

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 11 14:04:26 PST 2020


clayborg added a comment.

In D91130#2387692 <https://reviews.llvm.org/D91130#2387692>, @JDevlieghere wrote:

> In D91130#2387390 <https://reviews.llvm.org/D91130#2387390>, @clayborg wrote:
>
>> JSON crash logs are almost here??? I remember asking for those back when I was at Apple! Great news.
>
> Yep! 🥳

Nice!

>> It would be nice to have a crash log from a small but real process we might be able to load as an end to end test?
>
> I'd be happy to, but is there a way to test the crashlog script without having a `dsymForUUID`?

Yes, it would still load it up correctly and just show you the stack frame that are in the JSON format. The only reason you need dsymForUUID is to expand inline frames and add source file and line info if it isn't already in the crash log. So the test would test that it can parse the JSON format correctly and display what is already in the crash log without needing to actually re-symbolicate. "crashlog" doesn't assume it will be able to find symbols for all images. It will keep the string from the crashlog file that describes the address:

  Thread 0:: CrBrowserMain  Dispatch queue: com.apple.main-thread
  0   libsystem_kernel.dylib        	0x00007fff678a2dfa mach_msg_trap + 10
  1   libsystem_kernel.dylib        	0x00007fff678a3170 mach_msg + 60
  2   com.apple.CoreFoundation      	0x00007fff2d6f4ef5 __CFRunLoopServiceMachPort + 247
  3   com.apple.CoreFoundation      	0x00007fff2d6f39c2 __CFRunLoopRun + 1319
  4   com.apple.CoreFoundation      	0x00007fff2d6f2e3e CFRunLoopRunSpecific + 462
  5   com.apple.HIToolbox           	0x00007fff2c31fabd RunCurrentEventLoopInMode + 292
  6   com.apple.HIToolbox           	0x00007fff2c31f7d5 ReceiveNextEventCommon + 584
  7   com.apple.HIToolbox           	0x00007fff2c31f579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
  8   com.apple.AppKit              	0x00007fff2a965039 _DPSNextEvent + 883
  9   com.apple.AppKit              	0x00007fff2a963880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
  10  com.apple.AppKit              	0x00007fff2a95558e -[NSApplication run] + 658
  11  com.apple.AppKit              	0x00007fff2a927396 NSApplicationMain + 777
  12  com.sketchup.SketchUp.2017    	0x000000010a62638c main + 144
  13  libdyld.dylib                 	0x00007fff67761cc9 start + 1

So for the first frame here from the text based crash log it would keep "mach_msg_trap + 10" in case it can't symbolicate any better.


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

https://reviews.llvm.org/D91130



More information about the lldb-commits mailing list