[lldb] Use the non-locking variant of objc_copyRealizedClassList
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 25 Jun 2021 19:57:36 +0000 (12:57 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 25 Jun 2021 22:02:49 +0000 (15:02 -0700)
commitffc0533855871f4c784f6535044ce7c2bd076392
tree57b3e30721c14842b215ca52be6eb82d10c83058
parent4eabb12057616f360b2329f63c0379eced3135b4
[lldb] Use the non-locking variant of objc_copyRealizedClassList

Avoid standing the Objective-C runtime lock by calling
objc_copyRealizedClassList_nolock instead of objc_copyRealizedClassList.

We already guarantee that no other threads can run while we're running
this utility expression, similar to when we parse the data ourselves
from the gdb_objc_realized_classes struct.

Worst case this will crash if the list is getting edited, which won't do
any harm and we'll just try again later.

Differential revision: https://reviews.llvm.org/D104951
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp