[LLDB] Add checks for ValueObjectSP in Cocoa summary providers
authorshafik <syaghmour@apple.com>
Wed, 29 Jul 2020 20:29:16 +0000 (13:29 -0700)
committershafik <syaghmour@apple.com>
Wed, 29 Jul 2020 21:47:18 +0000 (14:47 -0700)
commit6700f4b9fe6321ef704efa4890af5bc351a124f0
tree123affa28702d1df179603b4cae8c54fdf53d8da
parentb1c1825b9972cf2c77917b8f2fc220946ab70bac
[LLDB] Add checks for ValueObjectSP in Cocoa summary providers

We saw a crash recently (rdar://problem/65276489) that looks related to an invalid ValueObjectSP in a summary providers in Cocoa.cpp e.g. NSBundleSummaryProvider(...).
This adds checks before we use them usually by calling NSStringSummaryProvider.

Differential Revision: https://reviews.llvm.org/D84272
lldb/source/Plugins/Language/ObjC/Cocoa.cpp