LLDB mainline
lldb_private::ClassDescriptorV2 Class Reference

#include <AppleObjCClassDescriptorV2.h>

Inheritance diagram for lldb_private::ClassDescriptorV2:
[legend]

Classes

struct  class_ro_t
struct  class_rw_t
struct  ivar_list_t
struct  ivar_t
class  iVarsStorage
struct  method_list_t
struct  method_t
struct  objc_class_t
struct  relative_list_entry_t
struct  relative_list_list_t

Public Member Functions

 ~ClassDescriptorV2 () override=default
ConstString GetClassName () override
ObjCLanguageRuntime::ClassDescriptorSP GetSuperclass () override
ObjCLanguageRuntime::ClassDescriptorSP GetMetaclass () const override
bool IsValid () override
lldb::LanguageType GetImplementationLanguage () const override
 Determine whether this class is implemented in Swift.
bool GetTaggedPointerInfo (uint64_t *info_bits=nullptr, uint64_t *value_bits=nullptr, uint64_t *payload=nullptr) override
 There are two routines in the ObjC runtime that tagged pointer clients can call to get the value from their tagged pointer, one that retrieves it as an unsigned value and one a signed value.
bool GetTaggedPointerInfoSigned (uint64_t *info_bits=nullptr, int64_t *value_bits=nullptr, uint64_t *payload=nullptr) override
uint64_t GetInstanceSize () override
ObjCLanguageRuntime::ObjCISA GetISA () override
bool Describe (std::function< void(ObjCLanguageRuntime::ObjCISA)> const &superclass_func, std::function< bool(const char *, const char *)> const &instance_method_func, std::function< bool(const char *, const char *)> const &class_method_func, std::function< bool(const char *, const char *, lldb::addr_t, uint64_t)> const &ivar_func) const override
size_t GetNumIVars () override
iVarDescriptor GetIVarAtIndex (size_t idx) override
Public Member Functions inherited from lldb_private::ObjCLanguageRuntime::ClassDescriptor
 ClassDescriptor ()
virtual ~ClassDescriptor ()=default
virtual bool IsKVO ()
virtual bool IsCFType ()
virtual bool CheckPointer (lldb::addr_t value, uint32_t ptr_size) const
virtual bool Describe (std::function< void(ObjCISA)> const &superclass_func, std::function< bool(const char *, const char *)> const &instance_method_func, std::function< bool(const char *, const char *)> const &class_method_func, std::function< bool(const char *, const char *, lldb::addr_t, uint64_t)> const &ivar_func) const
lldb::TypeSP GetType ()
void SetType (const lldb::TypeSP &type_sp)

Protected Member Functions

void GetIVarInformation ()
Protected Member Functions inherited from lldb_private::ObjCLanguageRuntime::ClassDescriptor
bool IsPointerValid (lldb::addr_t value, uint32_t ptr_size, bool allow_NULLs=false, bool allow_tagged=false, bool check_version_specific=false) const

Private Member Functions

std::optional< method_list_tGetMethodList (Process *process, lldb::addr_t method_list_ptr) const
 ClassDescriptorV2 (AppleObjCRuntimeV2 &runtime, ObjCLanguageRuntime::ObjCISA isa, const char *name)
bool Read_objc_class (Process *process, std::unique_ptr< objc_class_t > &objc_class) const
bool Read_class_row (Process *process, const objc_class_t &objc_class, std::unique_ptr< class_ro_t > &class_ro, std::unique_ptr< class_rw_t > &class_rw) const
bool ProcessMethodList (std::function< bool(const char *, const char *)> const &instance_method_func, method_list_t &method_list) const
bool ProcessRelativeMethodLists (std::function< bool(const char *, const char *)> const &instance_method_func, lldb::addr_t relative_method_list_ptr) const

Private Attributes

AppleObjCRuntimeV2m_runtime
lldb::addr_t m_objc_class_ptr
ConstString m_name
iVarsStorage m_ivars_storage
std::map< uint16_t, std::vector< method_list_t > > m_image_to_method_lists
std::optional< uint64_t > m_last_version_updated

Static Private Attributes

static const uint32_t RW_REALIZED = (1u << 31)

Friends

class lldb_private::AppleObjCRuntimeV2

Detailed Description

Definition at line 22 of file AppleObjCClassDescriptorV2.h.

Constructor & Destructor Documentation

◆ ~ClassDescriptorV2()

lldb_private::ClassDescriptorV2::~ClassDescriptorV2 ( )
overridedefault

◆ ClassDescriptorV2()

lldb_private::ClassDescriptorV2::ClassDescriptorV2 ( AppleObjCRuntimeV2 & runtime,
ObjCLanguageRuntime::ObjCISA isa,
const char * name )
inlineprivate

Member Function Documentation

◆ Describe()

◆ GetClassName()

ConstString ClassDescriptorV2::GetClassName ( )
overridevirtual

◆ GetImplementationLanguage()

LanguageType ClassDescriptorV2::GetImplementationLanguage ( ) const
overridevirtual

Determine whether this class is implemented in Swift.

Reimplemented from lldb_private::ObjCLanguageRuntime::ClassDescriptor.

Definition at line 675 of file AppleObjCClassDescriptorV2.cpp.

References lldb::eLanguageTypeObjC, lldb::eLanguageTypeSwift, IS_SWIFT_STABLE, m_runtime, and Read_objc_class().

◆ GetInstanceSize()

uint64_t ClassDescriptorV2::GetInstanceSize ( )
overridevirtual

◆ GetISA()

ObjCLanguageRuntime::ObjCISA lldb_private::ClassDescriptorV2::GetISA ( )
inlineoverridevirtual

◆ GetIVarAtIndex()

iVarDescriptor lldb_private::ClassDescriptorV2::GetIVarAtIndex ( size_t idx)
inlineoverridevirtual

◆ GetIVarInformation()

void ClassDescriptorV2::GetIVarInformation ( )
protected

Definition at line 744 of file AppleObjCClassDescriptorV2.cpp.

References m_ivars_storage, and m_runtime.

Referenced by GetNumIVars().

◆ GetMetaclass()

ObjCLanguageRuntime::ClassDescriptorSP ClassDescriptorV2::GetMetaclass ( ) const
overridevirtual

◆ GetMethodList()

◆ GetNumIVars()

size_t lldb_private::ClassDescriptorV2::GetNumIVars ( )
inlineoverridevirtual

◆ GetSuperclass()

ObjCLanguageRuntime::ClassDescriptorSP ClassDescriptorV2::GetSuperclass ( )
overridevirtual

◆ GetTaggedPointerInfo()

bool lldb_private::ClassDescriptorV2::GetTaggedPointerInfo ( uint64_t * info_bits = nullptr,
uint64_t * value_bits = nullptr,
uint64_t * payload = nullptr )
inlineoverridevirtual

There are two routines in the ObjC runtime that tagged pointer clients can call to get the value from their tagged pointer, one that retrieves it as an unsigned value and one a signed value.

These two GetTaggedPointerInfo methods mirror those two ObjC runtime calls.

Implements lldb_private::ObjCLanguageRuntime::ClassDescriptor.

Definition at line 41 of file AppleObjCClassDescriptorV2.h.

◆ GetTaggedPointerInfoSigned()

bool lldb_private::ClassDescriptorV2::GetTaggedPointerInfoSigned ( uint64_t * info_bits = nullptr,
int64_t * value_bits = nullptr,
uint64_t * payload = nullptr )
inlineoverridevirtual

◆ IsValid()

bool lldb_private::ClassDescriptorV2::IsValid ( )
inlineoverridevirtual

◆ ProcessMethodList()

◆ ProcessRelativeMethodLists()

bool ClassDescriptorV2::ProcessRelativeMethodLists ( std::function< bool(const char *, const char *)> const & instance_method_func,
lldb::addr_t relative_method_list_ptr ) const
private

◆ Read_class_row()

bool ClassDescriptorV2::Read_class_row ( Process * process,
const objc_class_t & objc_class,
std::unique_ptr< class_ro_t > & class_ro,
std::unique_ptr< class_rw_t > & class_rw ) const
private

◆ Read_objc_class()

bool ClassDescriptorV2::Read_objc_class ( Process * process,
std::unique_ptr< objc_class_t > & objc_class ) const
private

◆ lldb_private::AppleObjCRuntimeV2

Member Data Documentation

◆ m_image_to_method_lists

std::map<uint16_t, std::vector<method_list_t> > lldb_private::ClassDescriptorV2::m_image_to_method_lists
mutableprivate

Definition at line 276 of file AppleObjCClassDescriptorV2.h.

Referenced by ClassDescriptorV2(), and ProcessRelativeMethodLists().

◆ m_ivars_storage

iVarsStorage lldb_private::ClassDescriptorV2::m_ivars_storage
private

◆ m_last_version_updated

std::optional<uint64_t> lldb_private::ClassDescriptorV2::m_last_version_updated
mutableprivate

Definition at line 277 of file AppleObjCClassDescriptorV2.h.

Referenced by ClassDescriptorV2(), and ProcessRelativeMethodLists().

◆ m_name

ConstString lldb_private::ClassDescriptorV2::m_name
private

Definition at line 272 of file AppleObjCClassDescriptorV2.h.

Referenced by ClassDescriptorV2(), Describe(), and GetClassName().

◆ m_objc_class_ptr

lldb::addr_t lldb_private::ClassDescriptorV2::m_objc_class_ptr
private

Definition at line 269 of file AppleObjCClassDescriptorV2.h.

Referenced by ClassDescriptorV2(), GetISA(), and Read_objc_class().

◆ m_runtime

◆ RW_REALIZED

const uint32_t lldb_private::ClassDescriptorV2::RW_REALIZED = (1u << 31)
staticprivate

Definition at line 80 of file AppleObjCClassDescriptorV2.h.

Referenced by Read_class_row().


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