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 330 of file AppleObjCRuntimeV2.h.
Enumerator | |
---|---|
gdb_objc_realized_classes | |
objc_copyRealizedClassList | |
objc_getRealizedClassList_trylock |
Definition at line 339 of file AppleObjCRuntimeV2.h.
|
inline |
Definition at line 332 of file AppleObjCRuntimeV2.h.
|
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 1861 of file AppleObjCRuntimeV2.cpp.
References lldb_private::eDynamicClassInfoHelperAuto, lldb_private::eDynamicClassInfoHelperCopyRealizedClassList, lldb_private::eDynamicClassInfoHelperGetRealizedClassList, lldb_private::eDynamicClassInfoHelperRealizedClassesStruct, gdb_objc_realized_classes, lldb_private::TargetProperties::GetDynamicClassInfoHelper(), lldb_private::ExecutionContext::GetTargetRef(), objc_copyRealizedClassList, and objc_getRealizedClassList_trylock.
|
private |
Definition at line 1848 of file AppleObjCRuntimeV2.cpp.
|
private |
Definition at line 1816 of file AppleObjCRuntimeV2.cpp.
References g_get_dynamic_class_info2_body, g_get_dynamic_class_info2_name, g_get_dynamic_class_info3_body, g_get_dynamic_class_info3_name, g_get_dynamic_class_info_body, and g_get_dynamic_class_info_name.
|
private |
Definition at line 1751 of file AppleObjCRuntimeV2.cpp.
References lldb_private::Target::CreateUtilityFunction(), lldb::eBasicTypeVoid, lldb::eEncodingUint, lldb::eLanguageTypeC, error(), lldb_private::ScratchTypeSystemClang::GetForTarget(), lldb_private::GetLog(), lldb_private::CompilerType::GetPointerType(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::ExecutionContext::GetThreadSP(), LLDB_LOG, LLDB_LOG_ERROR, lldb_private::Process, lldb_private::ValueList::PushValue(), lldb_private::Value::Scalar, lldb_private::Value::SetCompilerType(), lldb_private::Value::SetValueType(), and lldb_private::Types.
AppleObjCRuntimeV2::DescriptorMapUpdateResult AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap | ( | RemoteNXMapTable & | hash_table | ) |
Definition at line 1989 of file AppleObjCRuntimeV2.cpp.
References lldb_private::Process::AllocateMemory(), lldb_private::DiagnosticManager::Clear(), lldb_private::Process::DeallocateMemory(), lldb_private::DiagnosticManager::Dump(), lldb::eEncodingUint, lldb::eExpressionCompleted, lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::AppleObjCRuntimeV2::DescriptorMapUpdateResult::Fail(), gdb_objc_realized_classes, lldb_private::Process::GetAddressByteSize(), lldb_private::FunctionCaller::GetArgumentValues(), lldb_private::Process::GetByteOrder(), lldb_private::WritableDataBuffer::GetBytes(), lldb_private::DataBufferHeap::GetByteSize(), RemoteNXMapTable::GetCount(), lldb_private::ThreadList::GetExpressionExecutionThread(), lldb_private::ScratchTypeSystemClang::GetForTarget(), lldb_private::UtilityFunction::GetFunctionCaller(), lldb_private::GetLog(), lldb_private::Value::GetScalar(), RemoteNXMapTable::GetTableLoadAddress(), lldb_private::Process::GetTarget(), lldb_private::Process::GetThreadList(), lldb_private::ProcessProperties::GetUtilityExpressionTimeout(), lldb_private::ValueList::GetValueAtIndex(), lldb_private::Log::GetVerbose(), LLDB_INVALID_ADDRESS, LLDB_LOG, LLDB_LOGF, lldb_private::Process, lldb_private::Process::ReadMemory(), lldb_private::AppleObjCRuntimeV2::DescriptorMapUpdateResult::Retry(), lldb_private::Value::Scalar, lldb_private::Value::SetCompilerType(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetIsForUtilityExpr(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::EvaluateExpressionOptions::SetTimeout(), lldb_private::EvaluateExpressionOptions::SetTryAllThreads(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), lldb_private::Value::SetValueType(), lldb_private::AppleObjCRuntimeV2::DescriptorMapUpdateResult::Success(), lldb_private::Types, lldb_private::Scalar::ULong(), and lldb_private::FunctionCaller::WriteFunctionArguments().
Referenced by lldb_private::AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded().
|
private |
Definition at line 364 of file AppleObjCRuntimeV2.h.
|
private |
Definition at line 365 of file AppleObjCRuntimeV2.h.
|
private |
Definition at line 366 of file AppleObjCRuntimeV2.h.