LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb_private::ObjCLanguageRuntime Class Referenceabstract

#include <ObjCLanguageRuntime.h>

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

Classes

class  ClassDescriptor
 
struct  ConstStringSetHelpers
 
class  EncodingToType
 
class  ObjCExceptionPrecondition
 
class  TaggedPointerVendor
 

Public Types

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
 

Public Member Functions

 ~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
 
virtual bool IsModuleObjCLibrary (const lldb::ModuleSP &module_sp)=0
 
virtual bool ReadObjCLibrary (const lldb::ModuleSP &module_sp)=0
 
virtual bool HasReadObjCLibrary ()=0
 
virtual lldb::ThreadPlanSP GetStepThroughTrampolinePlan (Thread &thread, bool stop_others)=0
 
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 bool GetObjectDescription (Stream &str, ValueObject &object)=0
 
virtual bool GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope)=0
 
virtual bool GetDynamicTypeAndAddress (ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type)=0
 
virtual CompilerType GetConcreteType (ExecutionContextScope *exe_scope, ConstString abstract_type_name)
 
virtual bool CouldHaveDynamicValue (ValueObject &in_value)=0
 
virtual TypeAndOrName FixUpDynamicType (const TypeAndOrName &type_and_or_name, ValueObject &static_value)=0
 
virtual void SetExceptionBreakpoints ()
 
virtual void ClearExceptionBreakpoints ()
 
virtual bool ExceptionBreakpointsAreSet ()
 
virtual bool ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason)
 
virtual lldb::ValueObjectSP GetExceptionObjectForThread (lldb::ThreadSP thread_sp)
 
virtual lldb::ThreadSP GetBacktraceThreadFromException (lldb::ValueObjectSP thread_sp)
 
ProcessGetProcess ()
 
TargetGetTargetRef ()
 
virtual lldb::BreakpointResolverSP CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp)=0
 
virtual lldb::SearchFilterSP CreateExceptionSearchFilter ()
 
virtual void ModulesDidLoad (const ModuleList &module_list)
 
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 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 Types

typedef std::map< ConstString, lldb::TypeWP > CompleteClassMap
 
typedef std::unordered_set< ConstString, ConstStringSetHelpers, ConstStringSetHelpersCompleteClassSet
 

Protected Member Functions

 ObjCLanguageRuntime (Process *process)
 
virtual bool CalculateHasNewLiteralsAndIndexing ()
 
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)
 

Protected Attributes

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
 

Friends

class ::CommandObjectObjC_ClassTable_Dump
 

Detailed Description

Definition at line 33 of file ObjCLanguageRuntime.h.

Member Typedef Documentation

◆ ClassDescriptorSP

Definition at line 43 of file ObjCLanguageRuntime.h.

◆ CompleteClassMap

typedef std::map<ConstString, lldb::TypeWP> lldb_private::ObjCLanguageRuntime::CompleteClassMap
protected

Definition at line 388 of file ObjCLanguageRuntime.h.

◆ CompleteClassSet

Definition at line 404 of file ObjCLanguageRuntime.h.

◆ EncodingToTypeSP

Definition at line 194 of file ObjCLanguageRuntime.h.

◆ ObjCISA

Definition at line 41 of file ObjCLanguageRuntime.h.

Member Enumeration Documentation

◆ ObjCRuntimeVersions

Enumerator
eObjC_VersionUnknown 
eAppleObjC_V1 
eAppleObjC_V2 

Definition at line 35 of file ObjCLanguageRuntime.h.

Constructor & Destructor Documentation

◆ ~ObjCLanguageRuntime()

ObjCLanguageRuntime::~ObjCLanguageRuntime ( )
override

Definition at line 32 of file ObjCLanguageRuntime.cpp.

◆ ObjCLanguageRuntime()

ObjCLanguageRuntime::ObjCLanguageRuntime ( Process process)
protected

Definition at line 34 of file ObjCLanguageRuntime.cpp.

Referenced by SymbolsDidLoad().

Member Function Documentation

◆ AddClass() [1/3]

bool lldb_private::ObjCLanguageRuntime::AddClass ( ObjCISA  isa,
const ClassDescriptorSP descriptor_sp 
)
inlineprotected

◆ AddClass() [2/3]

bool ObjCLanguageRuntime::AddClass ( ObjCISA  isa,
const ClassDescriptorSP descriptor_sp,
const char *  class_name 
)
protected

Definition at line 60 of file ObjCLanguageRuntime.cpp.

◆ AddClass() [3/3]

bool lldb_private::ObjCLanguageRuntime::AddClass ( ObjCISA  isa,
const ClassDescriptorSP descriptor_sp,
uint32_t  class_name_hash 
)
inlineprotected

◆ AddToClassNameCache() [1/2]

void lldb_private::ObjCLanguageRuntime::AddToClassNameCache ( lldb::addr_t  class_addr,
const char *  name,
lldb::TypeSP  type_sp 
)

Referenced by GetLanguageType().

◆ AddToClassNameCache() [2/2]

void lldb_private::ObjCLanguageRuntime::AddToClassNameCache ( lldb::addr_t  class_addr,
const TypeAndOrName class_or_type_name 
)

◆ AddToMethodCache()

void ObjCLanguageRuntime::AddToMethodCache ( lldb::addr_t  class_addr,
lldb::addr_t  sel,
lldb::addr_t  impl_addr 
)

◆ CalculateHasNewLiteralsAndIndexing()

virtual bool lldb_private::ObjCLanguageRuntime::CalculateHasNewLiteralsAndIndexing ( )
inlineprotectedvirtual

Reimplemented in lldb_private::AppleObjCRuntime.

Definition at line 304 of file ObjCLanguageRuntime.h.

Referenced by HasNewLiteralsAndIndexing().

◆ CreateObjectChecker()

virtual UtilityFunction* lldb_private::ObjCLanguageRuntime::CreateObjectChecker ( const char *  )
pure virtual

◆ DISALLOW_COPY_AND_ASSIGN()

lldb_private::ObjCLanguageRuntime::DISALLOW_COPY_AND_ASSIGN ( ObjCLanguageRuntime  )
protected

◆ GetActualTypeName()

ConstString ObjCLanguageRuntime::GetActualTypeName ( ObjCLanguageRuntime::ObjCISA  isa)
virtual

Reimplemented in lldb_private::AppleObjCRuntimeV2.

Definition at line 238 of file ObjCLanguageRuntime.cpp.

References GetNonKVOClassDescriptor().

Referenced by UpdateISAToDescriptorMap().

◆ GetByteOffsetForIvar()

size_t ObjCLanguageRuntime::GetByteOffsetForIvar ( CompilerType parent_qual_type,
const char *  ivar_name 
)
virtual

◆ GetClassDescriptor()

ObjCLanguageRuntime::ClassDescriptorSP ObjCLanguageRuntime::GetClassDescriptor ( ValueObject in_value)
virtual

Reimplemented in lldb_private::AppleObjCRuntimeV2.

Definition at line 255 of file ObjCLanguageRuntime.cpp.

References GetClassDescriptorFromISA(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::ValueObject::GetPointerValue(), lldb_private::CompilerType::IsValid(), and LLDB_INVALID_ADDRESS.

Referenced by lldb_private::formatters::CFBagSummaryProvider(), lldb_private::formatters::CFBinaryHeapSummaryProvider(), lldb_private::formatters::CFBitVectorSummaryProvider(), lldb_private::AppleObjCRuntimeV1::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntime::GetExceptionObjectForThread(), GetNonKVOClassDescriptor(), lldb_private::ObjCLanguage::GetPossibleFormattersMatches(), lldb_private::formatters::NSArraySummaryProvider(), lldb_private::formatters::NSArraySyntheticFrontEndCreator(), lldb_private::formatters::NSBundleSummaryProvider(), lldb_private::formatters::NSDataSummaryProvider(), lldb_private::formatters::NSDateSummaryProvider(), lldb_private::formatters::NSDictionarySummaryProvider(), lldb_private::formatters::NSDictionarySyntheticFrontEndCreator(), lldb_private::formatters::NSErrorSyntheticFrontEndCreator(), lldb_private::formatters::NSExceptionSyntheticFrontEndCreator(), lldb_private::formatters::NSIndexSetSummaryProvider(), lldb_private::formatters::NSMachPortSummaryProvider(), lldb_private::formatters::NSNotificationSummaryProvider(), lldb_private::formatters::NSNumberSummaryProvider(), lldb_private::formatters::NSSetSummaryProvider(), lldb_private::formatters::NSSetSyntheticFrontEndCreator(), lldb_private::formatters::NSStringSummaryProvider(), lldb_private::formatters::NSTimeZoneSummaryProvider(), lldb_private::formatters::NSURLSummaryProvider(), and NSIndexPathSyntheticFrontEnd::Update().

◆ GetClassDescriptorFromClassName()

ObjCLanguageRuntime::ClassDescriptorSP ObjCLanguageRuntime::GetClassDescriptorFromClassName ( ConstString  class_name)
virtual

Definition at line 246 of file ObjCLanguageRuntime.cpp.

References GetDescriptorIterator().

Referenced by GetTypeBitSize().

◆ GetClassDescriptorFromISA()

ObjCLanguageRuntime::ClassDescriptorSP ObjCLanguageRuntime::GetClassDescriptorFromISA ( ObjCISA  isa)
virtual

◆ GetDeclVendor()

virtual DeclVendor* lldb_private::ObjCLanguageRuntime::GetDeclVendor ( )
inlinevirtual

◆ GetDescriptorIterator()

ObjCLanguageRuntime::ISAToDescriptorIterator ObjCLanguageRuntime::GetDescriptorIterator ( ConstString  name)
protected

◆ GetDescriptorIteratorPair()

std::pair< ObjCLanguageRuntime::ISAToDescriptorIterator, ObjCLanguageRuntime::ISAToDescriptorIterator > ObjCLanguageRuntime::GetDescriptorIteratorPair ( bool  update_if_needed = true)
protected

◆ GetEncodingToType()

ObjCLanguageRuntime::EncodingToTypeSP ObjCLanguageRuntime::GetEncodingToType ( )
virtual

Reimplemented in lldb_private::AppleObjCRuntimeV2.

Definition at line 338 of file ObjCLanguageRuntime.cpp.

◆ GetISA()

ObjCLanguageRuntime::ObjCISA ObjCLanguageRuntime::GetISA ( ConstString  name)
virtual

◆ GetLanguageType()

lldb::LanguageType lldb_private::ObjCLanguageRuntime::GetLanguageType ( ) const
inlineoverridevirtual

◆ GetNonKVOClassDescriptor() [1/2]

ObjCLanguageRuntime::ClassDescriptorSP ObjCLanguageRuntime::GetNonKVOClassDescriptor ( ValueObject in_value)

Definition at line 278 of file ObjCLanguageRuntime.cpp.

References GetClassDescriptor().

Referenced by GetActualTypeName().

◆ GetNonKVOClassDescriptor() [2/2]

ObjCLanguageRuntime::ClassDescriptorSP ObjCLanguageRuntime::GetNonKVOClassDescriptor ( ObjCISA  isa)

Definition at line 305 of file ObjCLanguageRuntime.cpp.

References GetClassDescriptorFromISA().

◆ GetParentClass()

ObjCLanguageRuntime::ObjCISA ObjCLanguageRuntime::GetParentClass ( ObjCLanguageRuntime::ObjCISA  isa)
virtual

Definition at line 227 of file ObjCLanguageRuntime.cpp.

References GetClassDescriptorFromISA().

Referenced by UpdateISAToDescriptorMap().

◆ GetRuntimeVersion()

virtual ObjCRuntimeVersions lldb_private::ObjCLanguageRuntime::GetRuntimeVersion ( ) const
inlinevirtual

◆ GetStepThroughTrampolinePlan()

virtual lldb::ThreadPlanSP lldb_private::ObjCLanguageRuntime::GetStepThroughTrampolinePlan ( Thread thread,
bool  stop_others 
)
pure virtual

◆ GetTaggedPointerVendor()

virtual TaggedPointerVendor* lldb_private::ObjCLanguageRuntime::GetTaggedPointerVendor ( )
inlinevirtual

◆ GetTypeBitSize()

bool ObjCLanguageRuntime::GetTypeBitSize ( const CompilerType compiler_type,
uint64_t &  size 
)
overridevirtual

◆ HasNewLiteralsAndIndexing()

bool lldb_private::ObjCLanguageRuntime::HasNewLiteralsAndIndexing ( )
inline

◆ HasReadObjCLibrary()

virtual bool lldb_private::ObjCLanguageRuntime::HasReadObjCLibrary ( )
pure virtual

Implemented in lldb_private::AppleObjCRuntime.

Referenced by GetLanguageType().

◆ ISAIsCached()

bool lldb_private::ObjCLanguageRuntime::ISAIsCached ( ObjCISA  isa) const
inlineprotected

◆ IsModuleObjCLibrary()

virtual bool lldb_private::ObjCLanguageRuntime::IsModuleObjCLibrary ( const lldb::ModuleSP &  module_sp)
pure virtual

◆ IsRuntimeSupportValue()

bool ObjCLanguageRuntime::IsRuntimeSupportValue ( ValueObject valobj)
overridevirtual

Identify whether a value is a language implementation detaul that should be hidden from the user interface by default.

Reimplemented from lldb_private::LanguageRuntime.

Definition at line 47 of file ObjCLanguageRuntime.cpp.

References lldb_private::ValueObject::GetName(), lldb_private::ValueObject::GetVariable(), and IsWhitelistedRuntimeValue().

Referenced by SymbolsDidLoad().

◆ IsValidISA()

bool lldb_private::ObjCLanguageRuntime::IsValidISA ( ObjCISA  isa)
inline

◆ IsWhitelistedRuntimeValue()

bool ObjCLanguageRuntime::IsWhitelistedRuntimeValue ( ConstString  name)
static

Check whether the name is "self" or "_cmd" and should show up in "frame variable".

Definition at line 41 of file ObjCLanguageRuntime.cpp.

Referenced by lldb_private::CPPLanguageRuntime::IsRuntimeSupportValue(), IsRuntimeSupportValue(), and SymbolsDidLoad().

◆ LookupInClassNameCache()

TypeAndOrName lldb_private::ObjCLanguageRuntime::LookupInClassNameCache ( lldb::addr_t  class_addr)

Referenced by GetLanguageType().

◆ LookupInCompleteClassCache()

lldb::TypeSP ObjCLanguageRuntime::LookupInCompleteClassCache ( ConstString name)

◆ LookupInMethodCache()

lldb::addr_t ObjCLanguageRuntime::LookupInMethodCache ( lldb::addr_t  class_addr,
lldb::addr_t  sel 
)

◆ LookupRuntimeSymbol()

virtual lldb::addr_t lldb_private::ObjCLanguageRuntime::LookupRuntimeSymbol ( ConstString  name)
inlinevirtual

◆ ReadObjCLibrary()

virtual bool lldb_private::ObjCLanguageRuntime::ReadObjCLibrary ( const lldb::ModuleSP &  module_sp)
pure virtual

Implemented in lldb_private::AppleObjCRuntime.

Referenced by GetLanguageType().

◆ ReadObjCLibraryIfNeeded()

void lldb_private::ObjCLanguageRuntime::ReadObjCLibraryIfNeeded ( const ModuleList module_list)
protected

◆ SymbolsDidLoad()

virtual void lldb_private::ObjCLanguageRuntime::SymbolsDidLoad ( const ModuleList module_list)
inlinevirtual

◆ UpdateISAToDescriptorMap()

void lldb_private::ObjCLanguageRuntime::UpdateISAToDescriptorMap ( )
inline

◆ UpdateISAToDescriptorMapIfNeeded()

virtual void lldb_private::ObjCLanguageRuntime::UpdateISAToDescriptorMapIfNeeded ( )
pure virtual

Friends And Related Function Documentation

◆ ::CommandObjectObjC_ClassTable_Dump

friend class ::CommandObjectObjC_ClassTable_Dump
friend

Definition at line 409 of file ObjCLanguageRuntime.h.

Member Data Documentation

◆ m_complete_class_cache

CompleteClassMap lldb_private::ObjCLanguageRuntime::m_complete_class_cache
protected

Definition at line 389 of file ObjCLanguageRuntime.h.

Referenced by LookupInCompleteClassCache().

◆ m_isa_to_descriptor_stop_id

uint32_t lldb_private::ObjCLanguageRuntime::m_isa_to_descriptor_stop_id
protected

◆ m_negative_complete_class_cache

CompleteClassSet lldb_private::ObjCLanguageRuntime::m_negative_complete_class_cache
protected

Definition at line 405 of file ObjCLanguageRuntime.h.

Referenced by LookupInCompleteClassCache(), and SymbolsDidLoad().


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