LLDB mainline
|
We can read the class info from the Objective-C runtime using gdb_objc_realized_classes, objc_copyRealizedClassList or objc_getRealizedClassList_trylock. More...
Classes | |
struct | UtilityFunctionHelper |
Public Member Functions | |
DynamicClassInfoExtractor (AppleObjCRuntimeV2 &runtime) | |
DescriptorMapUpdateResult | UpdateISAToDescriptorMap (RemoteNXMapTable &hash_table) |
Public Member Functions inherited from lldb_private::AppleObjCRuntimeV2::ClassInfoExtractor | |
ClassInfoExtractor (AppleObjCRuntimeV2 &runtime) | |
std::mutex & | GetMutex () |
Private Types | |
enum | Helper { gdb_objc_realized_classes , objc_copyRealizedClassList , objc_getRealizedClassList_trylock } |
Private Member Functions | |
Helper | ComputeHelper (ExecutionContext &exe_ctx) const |
Compute which helper to use. | |
UtilityFunction * | GetClassInfoUtilityFunction (ExecutionContext &exe_ctx, Helper helper) |
lldb::addr_t & | GetClassInfoArgs (Helper helper) |
std::unique_ptr< UtilityFunction > | GetClassInfoUtilityFunctionImpl (ExecutionContext &exe_ctx, Helper helper, std::string code, std::string name) |
Private Attributes | |
UtilityFunctionHelper | m_gdb_objc_realized_classes_helper |
UtilityFunctionHelper | m_objc_copyRealizedClassList_helper |
UtilityFunctionHelper | m_objc_getRealizedClassList_trylock_helper |
Additional Inherited Members | |
Protected Attributes inherited from lldb_private::AppleObjCRuntimeV2::ClassInfoExtractor | |
AppleObjCRuntimeV2 & | m_runtime |
The lifetime of this object is tied to that of the runtime. | |
std::mutex | m_mutex |
We can read the class info from the Objective-C runtime using gdb_objc_realized_classes, objc_copyRealizedClassList or objc_getRealizedClassList_trylock.
The RealizedClassList variants are preferred because they include lazily named classes, but they are not always available or safe to call.
We potentially need more than one helper for the same process, because we may need to use gdb_objc_realized_classes until dyld is initialized and then switch over to objc_copyRealizedClassList or objc_getRealizedClassList_trylock for lazily named classes.
Definition at line 333 of file AppleObjCRuntimeV2.h.
Enumerator | |
---|---|
gdb_objc_realized_classes | |
objc_copyRealizedClassList | |
objc_getRealizedClassList_trylock |
Definition at line 342 of file AppleObjCRuntimeV2.h.
|
inline |
Definition at line 335 of file AppleObjCRuntimeV2.h.
References lldb_private::AppleObjCRuntimeV2::AppleObjCRuntimeV2(), and lldb_private::AppleObjCRuntimeV2::ClassInfoExtractor::ClassInfoExtractor().
|
private |
Compute which helper to use.
If dyld is not yet fully initialized we must use gdb_objc_realized_classes. Otherwise, we prefer objc_getRealizedClassList_trylock and objc_copyRealizedClassList respectively, depending on availability.
Definition at line 1843 of file AppleObjCRuntimeV2.cpp.
References g_get_dynamic_class_info2_body, g_get_dynamic_class_info2_name, GetClassInfoUtilityFunctionImpl(), m_objc_copyRealizedClassList_helper, and objc_copyRealizedClassList.
|
private |
Definition at line 1830 of file AppleObjCRuntimeV2.cpp.
References g_get_dynamic_class_info_body, g_get_dynamic_class_info_name, gdb_objc_realized_classes, GetClassInfoUtilityFunctionImpl(), and m_gdb_objc_realized_classes_helper.
|
private |
Definition at line 1798 of file AppleObjCRuntimeV2.cpp.
References objc_getRealizedClassList_trylock, lldb_private::ValueList::PushValue(), lldb_private::Value::Scalar, and lldb_private::Value::SetCompilerType().
|
private |
Definition at line 1733 of file AppleObjCRuntimeV2.cpp.
Referenced by ComputeHelper(), and GetClassInfoArgs().
AppleObjCRuntimeV2::DescriptorMapUpdateResult AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap | ( | RemoteNXMapTable & | hash_table | ) |
Definition at line 1971 of file AppleObjCRuntimeV2.cpp.
References error(), and lldb_private::Value::Scalar.
|
private |
Definition at line 367 of file AppleObjCRuntimeV2.h.
Referenced by GetClassInfoArgs().
|
private |
Definition at line 368 of file AppleObjCRuntimeV2.h.
Referenced by ComputeHelper().
|
private |
Definition at line 369 of file AppleObjCRuntimeV2.h.