9#ifndef LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCCLASSDESCRIPTORV2_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCCLASSDESCRIPTORV2_H
32 std::unique_ptr<ClassDescriptor>
GetMetaclass()
const override;
42 uint64_t *value_bits =
nullptr,
43 uint64_t *payload =
nullptr)
override {
48 int64_t *value_bits =
nullptr,
49 uint64_t *payload =
nullptr)
override {
59 std::function<
bool(
const char *,
const char *)>
const
60 &instance_method_func,
61 std::function<
bool(
const char *,
const char *)>
const &class_method_func,
62 std::function<
bool(
const char *,
const char *,
lldb::addr_t,
63 uint64_t)>
const &ivar_func)
const override;
90 static llvm::Expected<objc_class_t>
Read(
Process *process,
137 static llvm::Expected<method_list_t>
Read(
Process *process,
141 static llvm::Expected<method_list_t>
166 bool has_direct_sel,
bool has_relative_types);
169 static void ReadNames(llvm::MutableArrayRef<method_t> methods,
173 llvm::SmallVector<method_t, 0>
174 ReadMethods(llvm::ArrayRef<lldb::addr_t> addresses,
176 bool has_direct_sel,
bool has_relative_types)
const;
183 static llvm::Expected<ivar_list_t>
Read(
Process *process,
215 static llvm::Expected<
216 llvm::SmallVector<ClassDescriptorV2::relative_list_entry_t>>
224 static llvm::Expected<relative_list_list_t>
Read(
Process *process,
252 static llvm::Expected<class_ro_t>
256 &instance_method_func,
257 method_list_t &method_list)
const;
260 std::function<
bool(
const char *,
const char *)>
const
261 &instance_method_func,
290 uint64_t u_payload, int64_t s_payload) {
291 if (!actual_class_sp) {
295 m_name = actual_class_sp->GetClassName();
335 uint64_t *value_bits =
nullptr,
336 uint64_t *payload =
nullptr)
override {
347 int64_t *value_bits =
nullptr,
348 uint64_t *payload =
nullptr)
override {
bool GetTaggedPointerInfoSigned(uint64_t *info_bits=nullptr, int64_t *value_bits=nullptr, uint64_t *payload=nullptr) override
~ClassDescriptorV2Tagged() override=default
ObjCLanguageRuntime::ClassDescriptorSP GetSuperclass() override
ObjCLanguageRuntime::ObjCISA GetISA() override
int64_t m_value_bits_signed
virtual uint64_t GetValueBits()
ClassDescriptorV2Tagged(ConstString class_name, uint64_t payload)
virtual uint64_t GetInfoBits()
virtual uint64_t GetPayload()
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...
uint64_t GetInstanceSize() override
std::unique_ptr< ClassDescriptor > GetMetaclass() const override
ClassDescriptorV2Tagged(ObjCLanguageRuntime::ClassDescriptorSP actual_class_sp, uint64_t u_payload, int64_t s_payload)
ConstString GetClassName() override
virtual int64_t GetValueBitsSigned()
ObjCLanguageRuntime::ClassDescriptorSP GetSuperclass() override
iVarsStorage m_ivars_storage
void ProcessMethodList(std::function< bool(const char *, const char *)> const &instance_method_func, method_list_t &method_list) const
lldb::addr_t m_objc_class_ptr
llvm::SmallVector< method_t, 0 > ReadMethods(llvm::ArrayRef< lldb::addr_t > addresses, lldb::addr_t relative_string_base_addr, bool is_small, bool has_direct_sel, bool has_relative_types) const
AppleObjCRuntimeV2 & m_runtime
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
friend class lldb_private::AppleObjCRuntimeV2
static llvm::Expected< llvm::SmallVector< ClassDescriptorV2::relative_list_entry_t > > ReadRelativeListEntries(Process &process, llvm::ArrayRef< lldb::addr_t > addrs)
~ClassDescriptorV2() override=default
std::unique_ptr< ClassDescriptor > GetMetaclass() const override
ClassDescriptorV2(AppleObjCRuntimeV2 &runtime, ObjCLanguageRuntime::ObjCISA isa, const char *name)
ConstString GetClassName() override
static const uint32_t RW_REALIZED
llvm::Error ProcessRelativeMethodLists(std::function< bool(const char *, const char *)> const &instance_method_func, lldb::addr_t relative_method_list_ptr) const
iVarDescriptor GetIVarAtIndex(size_t idx) override
void GetIVarInformation()
uint64_t GetInstanceSize() override
bool GetTaggedPointerInfoSigned(uint64_t *info_bits=nullptr, int64_t *value_bits=nullptr, uint64_t *payload=nullptr) override
static llvm::Expected< class_ro_t > Read_class_row(Process *process, const objc_class_t &objc_class)
static llvm::Expected< method_list_t > GetMethodList(Process *process, lldb::addr_t method_list_ptr)
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...
lldb::LanguageType GetImplementationLanguage() const override
Determine whether this class is implemented in Swift.
size_t GetNumIVars() override
A uniqued constant string class.
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
A plug-in interface definition class for debugging a process.
uint32_t GetAddressByteSize() const
A class that represents a running process on the host machine.
LanguageType
Programming language type.
lldb::addr_t m_weakIvarLayout_ptr
static llvm::Expected< class_ro_t > Read(Process *process, lldb::addr_t addr)
lldb::addr_t m_ivarLayout_ptr
lldb::addr_t m_baseProtocols_ptr
lldb::addr_t m_baseMethods_ptr
lldb::addr_t m_baseProperties_ptr
lldb::addr_t m_properties_ptr
lldb::addr_t m_protocols_ptr
static llvm::Expected< class_rw_t > Read(Process *process, lldb::addr_t addr)
lldb::addr_t m_method_lists_ptr
lldb::addr_t m_method_list_ptr
static llvm::Expected< ivar_list_t > Read(Process *process, lldb::addr_t addr)
static size_t GetSize(Process *process)
lldb::addr_t m_offset_ptr
static llvm::Expected< ivar_t > Read(Process *process, lldb::addr_t addr)
bool m_has_direct_selector
bool m_has_relative_types
static llvm::Expected< method_list_t > Read(Process *process, lldb::addr_t addr)
static size_t GetSize(Process *process, bool is_small)
static void ReadNames(llvm::MutableArrayRef< method_t > methods, Process &process)
Fill in m_name and m_types efficiently by batching read requests.
bool Read(DataExtractor &extractor, Process *process, lldb::addr_t addr, lldb::addr_t relative_string_base_addr, bool is_small, bool has_direct_sel, bool has_relative_types)
lldb::addr_t m_vtable_ptr
static llvm::Expected< objc_class_t > Read(Process *process, lldb::addr_t addr)
ObjCLanguageRuntime::ObjCISA m_isa
ObjCLanguageRuntime::ObjCISA m_superclass
static llvm::Expected< relative_list_list_t > Read(Process *process, lldb::addr_t addr)