[lldb] Make LLDB resilient against failing dyld introspection SPIs
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 3 Aug 2022 22:45:18 +0000 (15:45 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 3 Aug 2022 22:47:58 +0000 (15:47 -0700)
commit71ebcd3348061de2fde3a13f1adb56059aca5997
tree501b01082ecb23ef5359d8278014023d2760162c
parente0b16aaaf99784efbb9dd9624787554d5584701a
[lldb] Make LLDB resilient against failing dyld introspection SPIs

Make LLDB resilient against failing dyld introspection SPIs:

 - dyld_process_create_for_current_task
 - dyld_process_snapshot_create_for_process
 - dyld_process_snapshot_get_shared_cache

These can all fail and return a nullptr. Instead of having an assert,
which doesn't really make sense, as we have no control over whether
these calls succeed or not, bail out gracefully and use the fallback
logic.

rdar://98070414

Differential revision: https://reviews.llvm.org/D131110
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm