LLDB mainline
|
#include <AppleObjCRuntime.h>
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static bool | classof (const LanguageRuntime *runtime) |
static std::tuple< FileSpec, ConstString > | GetExceptionThrowLocation () |
Static Public Member Functions inherited from lldb_private::ObjCLanguageRuntime | |
static lldb::BreakpointPreconditionSP | GetBreakpointExceptionPrecondition (lldb::LanguageType language, bool throw_bp) |
static bool | classof (const LanguageRuntime *runtime) |
static ObjCLanguageRuntime * | Get (Process &process) |
Static Public Member Functions inherited from lldb_private::LanguageRuntime | |
static LanguageRuntime * | FindPlugin (Process *process, lldb::LanguageType language) |
static void | InitializeCommands (CommandObject *parent) |
static lldb::BreakpointSP | CreateExceptionBreakpoint (Target &target, lldb::LanguageType language, bool catch_bp, bool throw_bp, bool is_internal=false) |
static lldb::BreakpointPreconditionSP | GetExceptionPrecondition (lldb::LanguageType language, bool throw_bp) |
static lldb::UnwindPlanSP | GetRuntimeUnwindPlan (lldb_private::Thread &thread, lldb_private::RegisterContext *regctx, bool &behaves_like_zeroth_frame) |
A language runtime may be able to provide a special UnwindPlan for the frame represented by the register contents regctx when that frame is not following the normal ABI conventions. | |
Static Public Attributes | |
static char | ID = 0 |
Static Public Attributes inherited from lldb_private::ObjCLanguageRuntime | |
static char | ID = 0 |
Static Public Attributes inherited from lldb_private::LanguageRuntime | |
static char | ID = 0 |
Static Protected Member Functions | |
static bool | AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp) |
static ObjCRuntimeVersions | GetObjCVersion (Process *process, lldb::ModuleSP &objc_module_sp) |
Protected Attributes | |
std::unique_ptr< Address > | m_PrintForDebugger_addr |
bool | m_read_objc_library |
std::unique_ptr< lldb_private::AppleObjCTrampolineHandler > | m_objc_trampoline_handler_up |
lldb::BreakpointSP | m_objc_exception_bp_sp |
lldb::ModuleWP | m_objc_module_wp |
std::unique_ptr< FunctionCaller > | m_print_object_caller_up |
std::optional< uint32_t > | m_Foundation_major |
Protected Attributes inherited from lldb_private::ObjCLanguageRuntime | |
uint32_t | m_isa_to_descriptor_stop_id |
CompleteClassMap | m_complete_class_cache |
CompleteClassSet | m_negative_complete_class_cache |
Protected Attributes inherited from lldb_private::Runtime | |
Process * | m_process |
Additional Inherited Members | |
Public Types inherited from lldb_private::ObjCLanguageRuntime | |
enum class | ObjCRuntimeVersions { eObjC_VersionUnknown = 0 , eAppleObjC_V1 = 1 , eAppleObjC_V2 = 2 , eGNUstep_libobjc2 = 3 } |
typedef lldb::addr_t | ObjCISA |
typedef std::shared_ptr< ClassDescriptor > | ClassDescriptorSP |
typedef std::shared_ptr< EncodingToType > | EncodingToTypeSP |
Protected Types inherited from lldb_private::ObjCLanguageRuntime | |
typedef std::map< ConstString, lldb::TypeWP > | CompleteClassMap |
typedef std::unordered_set< ConstString, ConstStringSetHelpers, ConstStringSetHelpers > | CompleteClassSet |
Definition at line 23 of file AppleObjCRuntime.h.
|
overridedefault |
|
protected |
Definition at line 55 of file AppleObjCRuntime.cpp.
References lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), and ReadObjCLibraryIfNeeded().
|
staticprotected |
Definition at line 313 of file AppleObjCRuntime.cpp.
References lldb_private::FileSpec::GetFilename().
Referenced by GetObjCModule(), GetObjCVersion(), and IsModuleObjCLibrary().
|
overrideprotectedvirtual |
Reimplemented from lldb_private::ObjCLanguageRuntime.
Definition at line 458 of file AppleObjCRuntime.cpp.
References lldb::eSymbolTypeCode, lldb_private::ModuleList::FindSymbolsWithNameAndType(), lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), lldb_private::SymbolContextList::IsEmpty(), and lldb_private::Runtime::m_process.
|
inlinestatic |
Definition at line 42 of file AppleObjCRuntime.h.
References ID, and lldb_private::LanguageRuntime::isA().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 432 of file AppleObjCRuntime.cpp.
References m_objc_exception_bp_sp, and lldb_private::Runtime::m_process.
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 269 of file AppleObjCRuntime.cpp.
References lldb_private::ValueObject::GetCompilerType(), and lldb_private::CompilerType::IsPossibleDynamicType().
Referenced by lldb_private::AppleObjCRuntimeV1::GetDynamicTypeAndAddress(), and lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 479 of file AppleObjCRuntime.cpp.
References lldb_private::FileSpecList::Append(), lldb_private::Target::GetArchitecture(), GetExceptionThrowLocation(), lldb_private::Target::GetSearchFilterForModuleList(), lldb_private::Process::GetTarget(), lldb_private::ArchSpec::GetTriple(), and lldb_private::Runtime::m_process.
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 441 of file AppleObjCRuntime.cpp.
References m_objc_exception_bp_sp.
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 445 of file AppleObjCRuntime.cpp.
References lldb::eStopReasonBreakpoint, lldb_private::Process::GetBreakpointSiteList(), m_objc_exception_bp_sp, lldb_private::Runtime::m_process, and lldb_private::StopPointSiteList< StopPointSite >::StopPointSiteContainsBreakpoint().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 284 of file AppleObjCRuntime.cpp.
References lldb_private::Flags::AllSet(), lldb_private::ValueObject::GetCompilerType(), lldb_private::TypeAndOrName::GetCompilerType(), lldb_private::ConstString::GetCString(), lldb_private::TypeAndOrName::GetName(), lldb_private::CompilerType::GetPointerType(), lldb_private::CompilerType::GetTypeInfo(), lldb_private::TypeAndOrName::HasType(), lldb_private::TypeAndOrName::SetCompilerType(), and lldb_private::TypeAndOrName::SetName().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 520 of file AppleObjCRuntime.cpp.
References lldb_private::ThreadCollection::AddThread(), lldb_private::ValueObjectConstResult::Create(), lldb::eBasicTypeObjCID, lldb::eDynamicDontRunTarget, lldb_private::StreamString::Empty(), error(), FailExceptionParsing(), lldb_private::DataExtractor::GetAddress(), lldb_private::Process::GetAddressByteSize(), lldb_private::Process::GetExtendedThreadList(), lldb_private::ScratchTypeSystemClang::GetForTarget(), lldb_private::StreamString::GetString(), lldb_private::Runtime::m_process, lldb_private::formatters::NSStringSummaryProvider(), pc, lldb_private::Process::ReadPointerFromMemory(), lldb_private::DataExtractor::SetAddressByteSize(), and lldb_private::Value::SetCompilerType().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Reimplemented in lldb_private::AppleObjCRuntimeV1, and lldb_private::AppleObjCRuntimeV2.
Definition at line 276 of file AppleObjCRuntime.cpp.
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 489 of file AppleObjCRuntime.cpp.
References lldb::eLanguageTypeC_plus_plus, lldb_private::ObjCLanguageRuntime::GetClassDescriptor(), lldb_private::Process::GetLanguageRuntime(), and lldb_private::Runtime::m_process.
|
static |
Definition at line 608 of file AppleObjCRuntime.cpp.
Referenced by lldb_private::AppleObjCRuntimeV1::CreateExceptionResolver(), lldb_private::AppleObjCRuntimeV2::CreateExceptionResolver(), CreateExceptionSearchFilter(), and RegisterObjCExceptionRecognizer().
uint32_t AppleObjCRuntime::GetFoundationVersion | ( | ) |
Definition at line 328 of file AppleObjCRuntime.cpp.
References lldb_private::Target::GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), lldb_private::Process::GetTarget(), LLDB_INVALID_MODULE_VERSION, m_Foundation_major, and lldb_private::Runtime::m_process.
Referenced by lldb_private::formatters::NSArraySummaryProvider(), lldb_private::formatters::NSArraySyntheticFrontEndCreator(), lldb_private::formatters::NSDictionarySummaryProvider(), lldb_private::formatters::NSDictionarySyntheticFrontEndCreator(), lldb_private::formatters::NSIndexSetSummaryProvider(), lldb_private::formatters::NSNumberSummaryProvider(), lldb_private::formatters::NSSetSummaryProvider(), and lldb_private::formatters::NSSetSyntheticFrontEndCreator().
lldb::ModuleSP AppleObjCRuntime::GetObjCModule | ( | ) |
Definition at line 225 of file AppleObjCRuntime.cpp.
References AppleIsModuleObjCLibrary(), lldb_private::Target::GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::Runtime::GetProcess(), lldb_private::ModuleList::GetSize(), lldb_private::Process::GetTarget(), and m_objc_module_wp.
Referenced by lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), lldb_private::AppleObjCRuntimeV2::GetISAHashTablePointer(), lldb_private::AppleObjCRuntimeV2::GetSharedCacheReadOnlyAddress(), lldb_private::AppleObjCRuntimeV2::GetTaggedPointerObfuscator(), lldb_private::AppleObjCRuntimeV2::RealizedClassGenerationCountChanged(), and lldb_private::AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded().
|
staticprotected |
Definition at line 379 of file AppleObjCRuntime.cpp.
References AppleIsModuleObjCLibrary(), lldb_private::ObjCLanguageRuntime::eAppleObjC_V1, lldb_private::ObjCLanguageRuntime::eAppleObjC_V2, lldb_private::ObjCLanguageRuntime::eObjC_VersionUnknown, lldb_private::SectionList::FindSectionByName(), lldb_private::Target::GetArchitecture(), lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), lldb_private::ArchSpec::GetTriple(), and lldb_private::ModuleList::Modules().
Referenced by lldb_private::AppleObjCRuntimeV1::CreateInstance(), and lldb_private::AppleObjCRuntimeV2::CreateInstance().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 102 of file AppleObjCRuntime.cpp.
References lldb_private::ExecutionContextScope::CalculateExecutionContext(), lldb_private::ExecutionContextScope::CalculateTarget(), DoNoSelectMostRelevantFrame, lldb::eBasicTypeObjCID, lldb::eBasicTypeVoid, lldb::eExpressionCompleted, lldb::eLanguageTypeObjC, error(), lldb_private::Value::GetCompilerType(), lldb_private::ScratchTypeSystemClang::GetForTarget(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::CompilerType::GetPointerType(), GetPrintForDebuggerAddr(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Value::GetScalar(), lldb_private::Thread::GetSelectedFrame(), lldb_private::ThreadList::GetSelectedThread(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Process::GetThreadList(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ProcessProperties::GetUtilityExpressionTimeout(), lldb_private::TypeSystemClang::IsObjCObjectPointerType(), LLDB_INVALID_ADDRESS, m_print_object_caller_up, lldb_private::Runtime::m_process, m_read_objc_library, lldb_private::ValueList::PushValue(), lldb_private::Process::ReadCStringFromMemory(), lldb_private::Value::SetCompilerType(), lldb_private::ExecutionContext::SetFrameSP(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetIsForUtilityExpr(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::ExecutionContext::SetThreadSP(), lldb_private::EvaluateExpressionOptions::SetTimeout(), lldb_private::EvaluateExpressionOptions::SetTryAllThreads(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), lldb_private::toString(), lldb_private::Scalar::ULongLong(), and lldb_private::Stream::Write().
Referenced by GetObjectDescription().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 71 of file AppleObjCRuntime.cpp.
References lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetExecutionContextRef(), GetObjectDescription(), lldb_private::ValueObject::GetProcessSP(), lldb_private::Value::GetScalar(), lldb_private::ValueObject::GetTargetSP(), lldb_private::ExecutionContext::HasProcessScope(), lldb_private::CompilerType::IsIntegerType(), lldb_private::CompilerType::IsPointerType(), lldb_private::ValueObject::ResolveValue(), and lldb_private::ExecutionContext::SetContext().
|
protected |
Definition at line 244 of file AppleObjCRuntime.cpp.
References lldb::eSymbolTypeCode, lldb_private::ModuleList::FindSymbolsWithNameAndType(), lldb_private::Symbol::GetAddress(), lldb_private::SymbolContextList::GetContextAtIndex(), lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), lldb_private::SymbolContextList::IsEmpty(), m_PrintForDebugger_addr, lldb_private::Runtime::m_process, and lldb_private::SymbolContext::symbol.
Referenced by GetObjectDescription().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 368 of file AppleObjCRuntime.cpp.
References m_objc_trampoline_handler_up.
|
virtual |
Reimplemented in lldb_private::AppleObjCRuntimeV2.
Definition at line 346 of file AppleObjCRuntime.cpp.
References LLDB_INVALID_ADDRESS.
Referenced by lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans().
|
inlineoverridevirtual |
Implements lldb_private::ObjCLanguageRuntime.
Definition at line 69 of file AppleObjCRuntime.h.
References m_read_objc_library.
Referenced by lldb_private::AppleObjCRuntimeV2::ModulesDidLoad(), and ReadObjCLibraryIfNeeded().
|
static |
Definition at line 61 of file AppleObjCRuntime.cpp.
References lldb_private::AppleObjCRuntimeV1::Initialize(), and lldb_private::AppleObjCRuntimeV2::Initialize().
|
inlineoverridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Reimplemented in lldb_private::AppleObjCRuntimeV1, and lldb_private::AppleObjCRuntimeV2.
Definition at line 38 of file AppleObjCRuntime.h.
References ID, and lldb_private::ObjCLanguageRuntime::isA().
Referenced by lldb_private::AppleObjCRuntimeV1::isA(), and lldb_private::AppleObjCRuntimeV2::isA().
|
overridevirtual |
Implements lldb_private::ObjCLanguageRuntime.
Definition at line 351 of file AppleObjCRuntime.cpp.
References AppleIsModuleObjCLibrary().
Referenced by ReadObjCLibraryIfNeeded().
|
inlinevirtual |
Reimplemented in lldb_private::AppleObjCRuntimeV2.
Definition at line 105 of file AppleObjCRuntime.h.
|
overridevirtual |
Called when modules have been loaded in the process.
Reimplemented from lldb_private::LanguageRuntime.
Reimplemented in lldb_private::AppleObjCRuntimeV2.
Definition at line 628 of file AppleObjCRuntime.cpp.
References ReadObjCLibraryIfNeeded().
Referenced by lldb_private::AppleObjCRuntimeV2::ModulesDidLoad().
|
overridevirtual |
Implements lldb_private::ObjCLanguageRuntime.
Definition at line 355 of file AppleObjCRuntime.cpp.
References m_objc_trampoline_handler_up, lldb_private::Runtime::m_process, and m_read_objc_library.
Referenced by ReadObjCLibraryIfNeeded().
|
protected |
Definition at line 613 of file AppleObjCRuntime.cpp.
References lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetMutex(), lldb_private::ModuleList::GetSize(), HasReadObjCLibrary(), IsModuleObjCLibrary(), and ReadObjCLibrary().
Referenced by AppleObjCRuntime(), and ModulesDidLoad().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 417 of file AppleObjCRuntime.cpp.
References lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), lldb_private::ObjCLanguageRuntime::GetLanguageType(), lldb_private::Process::GetTarget(), m_objc_exception_bp_sp, and lldb_private::Runtime::m_process.
|
static |
Definition at line 66 of file AppleObjCRuntime.cpp.
References lldb_private::AppleObjCRuntimeV1::Terminate(), and lldb_private::AppleObjCRuntimeV2::Terminate().
|
static |
Definition at line 32 of file AppleObjCRuntime.h.
|
protected |
Definition at line 130 of file AppleObjCRuntime.h.
Referenced by GetFoundationVersion().
|
protected |
Definition at line 126 of file AppleObjCRuntime.h.
Referenced by ClearExceptionBreakpoints(), ExceptionBreakpointsAreSet(), ExceptionBreakpointsExplainStop(), and SetExceptionBreakpoints().
|
protected |
Definition at line 127 of file AppleObjCRuntime.h.
Referenced by lldb_private::AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(), and GetObjCModule().
|
protected |
Definition at line 125 of file AppleObjCRuntime.h.
Referenced by GetStepThroughTrampolinePlan(), and ReadObjCLibrary().
|
protected |
Definition at line 128 of file AppleObjCRuntime.h.
Referenced by GetObjectDescription().
|
protected |
Definition at line 122 of file AppleObjCRuntime.h.
Referenced by GetPrintForDebuggerAddr().
|
protected |
Definition at line 123 of file AppleObjCRuntime.h.
Referenced by GetObjectDescription(), HasReadObjCLibrary(), and ReadObjCLibrary().