LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
lldb_private::AppleObjCRuntime Class Reference

#include <AppleObjCRuntime.h>

Inheritance diagram for lldb_private::AppleObjCRuntime:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::AppleObjCRuntime:
Collaboration graph
[legend]

Public Member Functions

 ~AppleObjCRuntime () override
 
bool GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope) override
 
bool GetObjectDescription (Stream &str, ValueObject &object) override
 
bool CouldHaveDynamicValue (ValueObject &in_value) override
 
bool GetDynamicTypeAndAddress (ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type) override
 
TypeAndOrName FixUpDynamicType (const TypeAndOrName &type_and_or_name, ValueObject &static_value) override
 
bool IsModuleObjCLibrary (const lldb::ModuleSP &module_sp) override
 
bool ReadObjCLibrary (const lldb::ModuleSP &module_sp) override
 
bool HasReadObjCLibrary () override
 
lldb::ThreadPlanSP GetStepThroughTrampolinePlan (Thread &thread, bool stop_others) override
 
lldb::ModuleSP GetObjCModule ()
 
void ModulesDidLoad (const ModuleList &module_list) override
 
void SetExceptionBreakpoints () override
 
void ClearExceptionBreakpoints () override
 
bool ExceptionBreakpointsAreSet () override
 
bool ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason) override
 
lldb::SearchFilterSP CreateExceptionSearchFilter () override
 
lldb::ValueObjectSP GetExceptionObjectForThread (lldb::ThreadSP thread_sp) override
 
lldb::ThreadSP GetBacktraceThreadFromException (lldb::ValueObjectSP thread_sp) override
 
uint32_t GetFoundationVersion ()
 
virtual void GetValuesForGlobalCFBooleans (lldb::addr_t &cf_true, lldb::addr_t &cf_false)
 
virtual bool IsTaggedPointer (lldb::addr_t addr)
 
- Public Member Functions inherited from lldb_private::ObjCLanguageRuntime
 ~ObjCLanguageRuntime () override
 
virtual TaggedPointerVendorGetTaggedPointerVendor ()
 
virtual EncodingToTypeSP GetEncodingToType ()
 
virtual ClassDescriptorSP GetClassDescriptor (ValueObject &in_value)
 
ClassDescriptorSP GetNonKVOClassDescriptor (ValueObject &in_value)
 
virtual ClassDescriptorSP GetClassDescriptorFromClassName (ConstString class_name)
 
virtual ClassDescriptorSP GetClassDescriptorFromISA (ObjCISA isa)
 
ClassDescriptorSP GetNonKVOClassDescriptor (ObjCISA isa)
 
lldb::LanguageType GetLanguageType () const override
 
lldb::addr_t LookupInMethodCache (lldb::addr_t class_addr, lldb::addr_t sel)
 
void AddToMethodCache (lldb::addr_t class_addr, lldb::addr_t sel, lldb::addr_t impl_addr)
 
TypeAndOrName LookupInClassNameCache (lldb::addr_t class_addr)
 
void AddToClassNameCache (lldb::addr_t class_addr, const char *name, lldb::TypeSP type_sp)
 
void AddToClassNameCache (lldb::addr_t class_addr, const TypeAndOrName &class_or_type_name)
 
lldb::TypeSP LookupInCompleteClassCache (ConstString &name)
 
virtual UtilityFunctionCreateObjectChecker (const char *)=0
 
virtual ObjCRuntimeVersions GetRuntimeVersion () const
 
bool IsValidISA (ObjCISA isa)
 
virtual void UpdateISAToDescriptorMapIfNeeded ()=0
 
void UpdateISAToDescriptorMap ()
 
virtual ObjCISA GetISA (ConstString name)
 
virtual ConstString GetActualTypeName (ObjCISA isa)
 
virtual ObjCISA GetParentClass (ObjCISA isa)
 
virtual DeclVendorGetDeclVendor ()
 
virtual size_t GetByteOffsetForIvar (CompilerType &parent_qual_type, const char *ivar_name)
 
virtual lldb::addr_t LookupRuntimeSymbol (ConstString name)
 
bool HasNewLiteralsAndIndexing ()
 
virtual void SymbolsDidLoad (const ModuleList &module_list)
 
bool GetTypeBitSize (const CompilerType &compiler_type, uint64_t &size) override
 
bool IsRuntimeSupportValue (ValueObject &valobj) override
 Identify whether a value is a language implementation detaul that should be hidden from the user interface by default. More...
 
- Public Member Functions inherited from lldb_private::LanguageRuntime
 ~LanguageRuntime () override
 
virtual CompilerType GetConcreteType (ExecutionContextScope *exe_scope, ConstString abstract_type_name)
 
ProcessGetProcess ()
 
TargetGetTargetRef ()
 
virtual lldb::BreakpointResolverSP CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp)=0
 
virtual bool GetOverrideExprOptions (clang::TargetOptions &prototype)
 
virtual bool GetIRPasses (LLVMUserExpression::IRPasses &custom_passes)
 
- Public Member Functions inherited from lldb_private::PluginInterface
virtual ~PluginInterface ()
 
virtual ConstString GetPluginName ()=0
 
virtual uint32_t GetPluginVersion ()=0
 

Static Public Member Functions

static bool classof (const ObjCLanguageRuntime *runtime)
 
static std::tuple< FileSpec, ConstStringGetExceptionThrowLocation ()
 
- Static Public Member Functions inherited from lldb_private::ObjCLanguageRuntime
static bool IsWhitelistedRuntimeValue (ConstString name)
 Check whether the name is "self" or "_cmd" and should show up in "frame variable". More...
 
- Static Public Member Functions inherited from lldb_private::LanguageRuntime
static LanguageRuntimeFindPlugin (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 Breakpoint::BreakpointPreconditionSP CreateExceptionPrecondition (lldb::LanguageType language, bool catch_bp, bool throw_bp)
 

Protected Member Functions

 AppleObjCRuntime (Process *process)
 
bool CalculateHasNewLiteralsAndIndexing () override
 
void ReadObjCLibraryIfNeeded (const ModuleList &module_list)
 
AddressGetPrintForDebuggerAddr ()
 
- Protected Member Functions inherited from lldb_private::ObjCLanguageRuntime
 ObjCLanguageRuntime (Process *process)
 
bool ISAIsCached (ObjCISA isa) const
 
bool AddClass (ObjCISA isa, const ClassDescriptorSP &descriptor_sp)
 
bool AddClass (ObjCISA isa, const ClassDescriptorSP &descriptor_sp, const char *class_name)
 
bool AddClass (ObjCISA isa, const ClassDescriptorSP &descriptor_sp, uint32_t class_name_hash)
 
ISAToDescriptorIterator GetDescriptorIterator (ConstString name)
 
std::pair< ISAToDescriptorIterator, ISAToDescriptorIterator > GetDescriptorIteratorPair (bool update_if_needed=true)
 
void ReadObjCLibraryIfNeeded (const ModuleList &module_list)
 
 DISALLOW_COPY_AND_ASSIGN (ObjCLanguageRuntime)
 
- Protected Member Functions inherited from lldb_private::LanguageRuntime
 LanguageRuntime (Process *process)
 

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< Addressm_PrintForDebugger_addr
 
bool m_read_objc_library
 
std::unique_ptr< lldb_private::AppleObjCTrampolineHandlerm_objc_trampoline_handler_up
 
lldb::BreakpointSP m_objc_exception_bp_sp
 
lldb::ModuleWP m_objc_module_wp
 
std::unique_ptr< FunctionCallerm_print_object_caller_up
 
llvm::Optional< uint32_tm_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::LanguageRuntime
Processm_process
 

Additional Inherited Members

- Public Types inherited from lldb_private::ObjCLanguageRuntime
enum  ObjCRuntimeVersions { ObjCRuntimeVersions::eObjC_VersionUnknown = 0, ObjCRuntimeVersions::eAppleObjC_V1 = 1, ObjCRuntimeVersions::eAppleObjC_V2 = 2 }
 
typedef lldb::addr_t ObjCISA
 
typedef std::shared_ptr< ClassDescriptorClassDescriptorSP
 
typedef std::shared_ptr< EncodingToTypeEncodingToTypeSP
 
- Protected Types inherited from lldb_private::ObjCLanguageRuntime
typedef std::map< ConstString, lldb::TypeWP > CompleteClassMap
 
typedef std::unordered_set< ConstString, ConstStringSetHelpers, ConstStringSetHelpersCompleteClassSet
 

Detailed Description

Definition at line 22 of file AppleObjCRuntime.h.

Constructor & Destructor Documentation

◆ ~AppleObjCRuntime()

AppleObjCRuntime::~AppleObjCRuntime ( )
override

Definition at line 48 of file AppleObjCRuntime.cpp.

◆ AppleObjCRuntime()

AppleObjCRuntime::AppleObjCRuntime ( Process process)
protected

Member Function Documentation

◆ AppleIsModuleObjCLibrary()

bool AppleObjCRuntime::AppleIsModuleObjCLibrary ( const lldb::ModuleSP &  module_sp)
staticprotected

◆ CalculateHasNewLiteralsAndIndexing()

bool AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing ( )
overrideprotectedvirtual

◆ classof()

static bool lldb_private::AppleObjCRuntime::classof ( const ObjCLanguageRuntime runtime)
inlinestatic

◆ ClearExceptionBreakpoints()

void AppleObjCRuntime::ClearExceptionBreakpoints ( )
overridevirtual

◆ CouldHaveDynamicValue()

bool AppleObjCRuntime::CouldHaveDynamicValue ( ValueObject in_value)
overridevirtual

◆ CreateExceptionSearchFilter()

lldb::SearchFilterSP AppleObjCRuntime::CreateExceptionSearchFilter ( )
overridevirtual

◆ ExceptionBreakpointsAreSet()

bool AppleObjCRuntime::ExceptionBreakpointsAreSet ( )
overridevirtual

Reimplemented from lldb_private::LanguageRuntime.

Definition at line 415 of file AppleObjCRuntime.cpp.

References m_objc_exception_bp_sp.

Referenced by HasReadObjCLibrary().

◆ ExceptionBreakpointsExplainStop()

bool AppleObjCRuntime::ExceptionBreakpointsExplainStop ( lldb::StopInfoSP  stop_reason)
overridevirtual

◆ FixUpDynamicType()

TypeAndOrName AppleObjCRuntime::FixUpDynamicType ( const TypeAndOrName type_and_or_name,
ValueObject static_value 
)
overridevirtual

◆ GetBacktraceThreadFromException()

ThreadSP AppleObjCRuntime::GetBacktraceThreadFromException ( lldb::ValueObjectSP  thread_sp)
overridevirtual

◆ GetDynamicTypeAndAddress()

bool AppleObjCRuntime::GetDynamicTypeAndAddress ( ValueObject in_value,
lldb::DynamicValueType  use_dynamic,
TypeAndOrName class_type_or_name,
Address address,
Value::ValueType value_type 
)
overridevirtual

Implements lldb_private::LanguageRuntime.

Reimplemented in lldb_private::AppleObjCRuntimeV1, and lldb_private::AppleObjCRuntimeV2.

Definition at line 245 of file AppleObjCRuntime.cpp.

Referenced by classof().

◆ GetExceptionObjectForThread()

ValueObjectSP AppleObjCRuntime::GetExceptionObjectForThread ( lldb::ThreadSP  thread_sp)
overridevirtual

◆ GetExceptionThrowLocation()

std::tuple< FileSpec, ConstString > AppleObjCRuntime::GetExceptionThrowLocation ( )
static

◆ GetFoundationVersion()

uint32_t AppleObjCRuntime::GetFoundationVersion ( )

◆ GetObjCModule()

lldb::ModuleSP AppleObjCRuntime::GetObjCModule ( )

◆ GetObjCVersion()

ObjCLanguageRuntime::ObjCRuntimeVersions AppleObjCRuntime::GetObjCVersion ( Process process,
lldb::ModuleSP &  objc_module_sp 
)
staticprotected

◆ GetObjectDescription() [1/2]

bool AppleObjCRuntime::GetObjectDescription ( Stream str,
Value value,
ExecutionContextScope exe_scope 
)
overridevirtual

Implements lldb_private::LanguageRuntime.

Definition at line 84 of file AppleObjCRuntime.cpp.

References lldb_private::Status::AsCString(), lldb_private::ExecutionContextScope::CalculateExecutionContext(), lldb_private::ExecutionContextScope::CalculateTarget(), lldb::eBasicTypeObjCID, lldb::eBasicTypeVoid, lldb::eExpressionCompleted, lldb::eLanguageTypeObjC, lldb_private::Status::Fail(), lldb_private::ClangASTContext::GetBasicType(), lldb_private::Value::GetCompilerType(), lldb_private::ClangASTContext::GetCStringType(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::CompilerType::GetPointerType(), GetPrintForDebuggerAddr(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Value::GetScalar(), lldb_private::Target::GetScratchClangASTContext(), 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::ClangASTContext::IsObjCObjectPointerType(), LLDB_INVALID_ADDRESS, m_print_object_caller_up, lldb_private::LanguageRuntime::m_process, m_read_objc_library, lldb_private::Stream::Printf(), 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::Scalar::ULongLong(), and lldb_private::Stream::Write().

Referenced by classof(), and GetObjectDescription().

◆ GetObjectDescription() [2/2]

bool AppleObjCRuntime::GetObjectDescription ( Stream str,
ValueObject object 
)
overridevirtual

◆ GetPrintForDebuggerAddr()

Address * AppleObjCRuntime::GetPrintForDebuggerAddr ( )
protected

◆ GetStepThroughTrampolinePlan()

ThreadPlanSP AppleObjCRuntime::GetStepThroughTrampolinePlan ( Thread thread,
bool  stop_others 
)
overridevirtual

Implements lldb_private::ObjCLanguageRuntime.

Definition at line 337 of file AppleObjCRuntime.cpp.

References m_objc_trampoline_handler_up.

Referenced by HasReadObjCLibrary().

◆ GetValuesForGlobalCFBooleans()

void AppleObjCRuntime::GetValuesForGlobalCFBooleans ( lldb::addr_t cf_true,
lldb::addr_t cf_false 
)
virtual

Reimplemented in lldb_private::AppleObjCRuntimeV2.

Definition at line 315 of file AppleObjCRuntime.cpp.

References LLDB_INVALID_ADDRESS.

Referenced by HasReadObjCLibrary().

◆ HasReadObjCLibrary()

bool lldb_private::AppleObjCRuntime::HasReadObjCLibrary ( )
inlineoverridevirtual

◆ IsModuleObjCLibrary()

bool AppleObjCRuntime::IsModuleObjCLibrary ( const lldb::ModuleSP &  module_sp)
overridevirtual

Implements lldb_private::ObjCLanguageRuntime.

Definition at line 320 of file AppleObjCRuntime.cpp.

References AppleIsModuleObjCLibrary().

Referenced by classof(), and ReadObjCLibraryIfNeeded().

◆ IsTaggedPointer()

virtual bool lldb_private::AppleObjCRuntime::IsTaggedPointer ( lldb::addr_t  addr)
inlinevirtual

◆ ModulesDidLoad()

void AppleObjCRuntime::ModulesDidLoad ( const ModuleList module_list)
overridevirtual

Reimplemented from lldb_private::LanguageRuntime.

Definition at line 581 of file AppleObjCRuntime.cpp.

References ReadObjCLibraryIfNeeded().

Referenced by HasReadObjCLibrary().

◆ ReadObjCLibrary()

bool AppleObjCRuntime::ReadObjCLibrary ( const lldb::ModuleSP &  module_sp)
overridevirtual

◆ ReadObjCLibraryIfNeeded()

void AppleObjCRuntime::ReadObjCLibraryIfNeeded ( const ModuleList module_list)
protected

◆ SetExceptionBreakpoints()

void AppleObjCRuntime::SetExceptionBreakpoints ( )
overridevirtual

Member Data Documentation

◆ m_Foundation_major

llvm::Optional<uint32_t> lldb_private::AppleObjCRuntime::m_Foundation_major
protected

Definition at line 125 of file AppleObjCRuntime.h.

Referenced by GetFoundationVersion().

◆ m_objc_exception_bp_sp

lldb::BreakpointSP lldb_private::AppleObjCRuntime::m_objc_exception_bp_sp
protected

◆ m_objc_module_wp

lldb::ModuleWP lldb_private::AppleObjCRuntime::m_objc_module_wp
protected

Definition at line 122 of file AppleObjCRuntime.h.

Referenced by GetObjCModule().

◆ m_objc_trampoline_handler_up

std::unique_ptr<lldb_private::AppleObjCTrampolineHandler> lldb_private::AppleObjCRuntime::m_objc_trampoline_handler_up
protected

Definition at line 120 of file AppleObjCRuntime.h.

Referenced by GetStepThroughTrampolinePlan(), and ReadObjCLibrary().

◆ m_print_object_caller_up

std::unique_ptr<FunctionCaller> lldb_private::AppleObjCRuntime::m_print_object_caller_up
protected

Definition at line 123 of file AppleObjCRuntime.h.

Referenced by GetObjectDescription().

◆ m_PrintForDebugger_addr

std::unique_ptr<Address> lldb_private::AppleObjCRuntime::m_PrintForDebugger_addr
protected

Definition at line 117 of file AppleObjCRuntime.h.

Referenced by GetPrintForDebuggerAddr().

◆ m_read_objc_library

bool lldb_private::AppleObjCRuntime::m_read_objc_library
protected

Definition at line 118 of file AppleObjCRuntime.h.

Referenced by GetObjectDescription(), HasReadObjCLibrary(), and ReadObjCLibrary().


The documentation for this class was generated from the following files: