LLDB  mainline
AppleObjCClassDescriptorV2.h
Go to the documentation of this file.
1 //===-- AppleObjCClassDescriptorV2.h ----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCCLASSDESCRIPTORV2_H
10 #define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCCLASSDESCRIPTORV2_H
11 
12 #include <mutex>
13 
14 #include "AppleObjCRuntimeV2.h"
15 #include "lldb/lldb-private.h"
16 
18 
19 namespace lldb_private {
20 
22 public:
24 
25  ~ClassDescriptorV2() override = default;
26 
27  ConstString GetClassName() override;
28 
30 
32 
33  bool IsValid() override {
34  return true; // any Objective-C v2 runtime class descriptor we vend is valid
35  }
36 
37  // a custom descriptor is used for tagged pointers
38  bool GetTaggedPointerInfo(uint64_t *info_bits = nullptr,
39  uint64_t *value_bits = nullptr,
40  uint64_t *payload = nullptr) override {
41  return false;
42  }
43 
44  bool GetTaggedPointerInfoSigned(uint64_t *info_bits = nullptr,
45  int64_t *value_bits = nullptr,
46  uint64_t *payload = nullptr) override {
47  return false;
48  }
49 
50  uint64_t GetInstanceSize() override;
51 
53 
54  bool Describe(
55  std::function<void(ObjCLanguageRuntime::ObjCISA)> const &superclass_func,
56  std::function<bool(const char *, const char *)> const
57  &instance_method_func,
58  std::function<bool(const char *, const char *)> const &class_method_func,
59  std::function<bool(const char *, const char *, lldb::addr_t,
60  uint64_t)> const &ivar_func) const override;
61 
62  size_t GetNumIVars() override {
64  return m_ivars_storage.size();
65  }
66 
67  iVarDescriptor GetIVarAtIndex(size_t idx) override {
68  if (idx >= GetNumIVars())
69  return iVarDescriptor();
70  return m_ivars_storage[idx];
71  }
72 
73 protected:
74  void GetIVarInformation();
75 
76 private:
77  static const uint32_t RW_REALIZED = (1 << 31);
78 
79  struct objc_class_t {
80  ObjCLanguageRuntime::ObjCISA m_isa = 0; // The class's metaclass.
85  uint8_t m_flags = 0;
86 
87  objc_class_t() = default;
88 
89  void Clear() {
90  m_isa = 0;
91  m_superclass = 0;
92  m_cache_ptr = 0;
93  m_vtable_ptr = 0;
94  m_data_ptr = 0;
95  m_flags = 0;
96  }
97 
98  bool Read(Process *process, lldb::addr_t addr);
99  };
100 
101  struct class_ro_t {
106 
112 
115 
117 
118  bool Read(Process *process, lldb::addr_t addr);
119  };
120 
121  struct class_rw_t {
124 
126  union {
129  };
132 
135 
136  bool Read(Process *process, lldb::addr_t addr);
137  };
138 
139  struct method_list_t {
145 
146  bool Read(Process *process, lldb::addr_t addr);
147  };
148 
149  struct method_t {
153 
156 
157  static size_t GetSize(Process *process, bool is_small) {
158  size_t field_size;
159  if (is_small)
160  field_size = 4; // uint32_t relative indirect fields
161  else
162  field_size = process->GetAddressByteSize();
163 
164  return field_size // SEL name;
165  + field_size // const char *types;
166  + field_size; // IMP imp;
167  }
168 
169  bool Read(Process *process, lldb::addr_t addr,
170  lldb::addr_t relative_method_lists_base_addr, bool, bool);
171  };
172 
173  struct ivar_list_t {
177 
178  bool Read(Process *process, lldb::addr_t addr);
179  };
180 
181  struct ivar_t {
187 
190 
191  static size_t GetSize(Process *process) {
192  size_t ptr_size = process->GetAddressByteSize();
193 
194  return ptr_size // uintptr_t *offset;
195  + ptr_size // const char *name;
196  + ptr_size // const char *type;
197  + sizeof(uint32_t) // uint32_t alignment;
198  + sizeof(uint32_t); // uint32_t size;
199  }
200 
201  bool Read(Process *process, lldb::addr_t addr);
202  };
203 
204  class iVarsStorage {
205  public:
206  iVarsStorage();
207 
208  size_t size();
209 
210  iVarDescriptor &operator[](size_t idx);
211 
212  void fill(AppleObjCRuntimeV2 &runtime, ClassDescriptorV2 &descriptor);
213 
214  private:
215  bool m_filled = false;
216  std::vector<iVarDescriptor> m_ivars;
217  std::recursive_mutex m_mutex;
218  };
219 
220  // The constructor should only be invoked by the runtime as it builds its
221  // caches
222  // or populates them. A ClassDescriptorV2 should only ever exist in a cache.
224  ObjCLanguageRuntime::ObjCISA isa, const char *name)
225  : m_runtime(runtime), m_objc_class_ptr(isa), m_name(name),
226  m_ivars_storage() {}
227 
228  bool Read_objc_class(Process *process,
229  std::unique_ptr<objc_class_t> &objc_class) const;
230 
231  bool Read_class_row(Process *process, const objc_class_t &objc_class,
232  std::unique_ptr<class_ro_t> &class_ro,
233  std::unique_ptr<class_rw_t> &class_rw) const;
234 
236  &m_runtime; // The runtime, so we can read information lazily.
237  lldb::addr_t m_objc_class_ptr; // The address of the objc_class_t. (I.e.,
238  // objects of this class type have this as
239  // their ISA)
240  ConstString m_name; // May be NULL
242 };
243 
244 // tagged pointer descriptor
246 public:
247  ClassDescriptorV2Tagged(ConstString class_name, uint64_t payload) {
248  m_name = class_name;
249  if (!m_name) {
250  m_valid = false;
251  return;
252  }
253  m_valid = true;
254  m_payload = payload;
255  m_info_bits = (m_payload & 0xF0ULL) >> 4;
256  m_value_bits = (m_payload & ~0x0000000000000000FFULL) >> 8;
257  }
258 
261  uint64_t u_payload, int64_t s_payload) {
262  if (!actual_class_sp) {
263  m_valid = false;
264  return;
265  }
266  m_name = actual_class_sp->GetClassName();
267  if (!m_name) {
268  m_valid = false;
269  return;
270  }
271  m_valid = true;
272  m_payload = u_payload;
273  m_info_bits = (m_payload & 0x0FULL);
274  m_value_bits = (m_payload & ~0x0FULL) >> 4;
275  m_value_bits_signed = (s_payload & ~0x0FLL) >> 4;
276  }
277 
278  ~ClassDescriptorV2Tagged() override = default;
279 
280  ConstString GetClassName() override { return m_name; }
281 
283  // tagged pointers can represent a class that has a superclass, but since
284  // that information is not
285  // stored in the object itself, we would have to query the runtime to
286  // discover the hierarchy
287  // for the time being, we skip this step in the interest of static discovery
289  }
290 
293  }
294 
295  bool IsValid() override { return m_valid; }
296 
297  bool IsKVO() override {
298  return false; // tagged pointers are not KVO'ed
299  }
300 
301  bool IsCFType() override {
302  return false; // tagged pointers are not CF objects
303  }
304 
305  bool GetTaggedPointerInfo(uint64_t *info_bits = nullptr,
306  uint64_t *value_bits = nullptr,
307  uint64_t *payload = nullptr) override {
308  if (info_bits)
309  *info_bits = GetInfoBits();
310  if (value_bits)
311  *value_bits = GetValueBits();
312  if (payload)
313  *payload = GetPayload();
314  return true;
315  }
316 
317  bool GetTaggedPointerInfoSigned(uint64_t *info_bits = nullptr,
318  int64_t *value_bits = nullptr,
319  uint64_t *payload = nullptr) override {
320  if (info_bits)
321  *info_bits = GetInfoBits();
322  if (value_bits)
323  *value_bits = GetValueBitsSigned();
324  if (payload)
325  *payload = GetPayload();
326  return true;
327  }
328 
329  uint64_t GetInstanceSize() override {
330  return (IsValid() ? m_pointer_size : 0);
331  }
332 
334  return 0; // tagged pointers have no ISA
335  }
336 
337  // these calls are not part of any formal tagged pointers specification
338  virtual uint64_t GetValueBits() { return (IsValid() ? m_value_bits : 0); }
339 
340  virtual int64_t GetValueBitsSigned() {
341  return (IsValid() ? m_value_bits_signed : 0);
342  }
343 
344  virtual uint64_t GetInfoBits() { return (IsValid() ? m_info_bits : 0); }
345 
346  virtual uint64_t GetPayload() { return (IsValid() ? m_payload : 0); }
347 
348 private:
350  uint8_t m_pointer_size;
351  bool m_valid;
352  uint64_t m_info_bits;
353  uint64_t m_value_bits;
355  uint64_t m_payload;
356 };
357 
358 } // namespace lldb_private
359 
360 #endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCCLASSDESCRIPTORV2_H
lldb_private::ClassDescriptorV2Tagged::GetMetaclass
ObjCLanguageRuntime::ClassDescriptorSP GetMetaclass() const override
Definition: AppleObjCClassDescriptorV2.h:291
lldb_private::ClassDescriptorV2::class_ro_t::m_flags
uint32_t m_flags
Definition: AppleObjCClassDescriptorV2.h:102
lldb_private::ClassDescriptorV2::method_t::m_name_ptr
lldb::addr_t m_name_ptr
Definition: AppleObjCClassDescriptorV2.h:150
lldb_private::ClassDescriptorV2Tagged::m_pointer_size
uint8_t m_pointer_size
Definition: AppleObjCClassDescriptorV2.h:350
lldb_private::ClassDescriptorV2Tagged::GetTaggedPointerInfo
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...
Definition: AppleObjCClassDescriptorV2.h:305
lldb_private::ClassDescriptorV2::ivar_t::m_size
uint32_t m_size
Definition: AppleObjCClassDescriptorV2.h:186
lldb_private::ClassDescriptorV2Tagged::GetInstanceSize
uint64_t GetInstanceSize() override
Definition: AppleObjCClassDescriptorV2.h:329
lldb_private::ClassDescriptorV2::GetMetaclass
ObjCLanguageRuntime::ClassDescriptorSP GetMetaclass() const override
Definition: AppleObjCClassDescriptorV2.cpp:484
lldb_private::ClassDescriptorV2Tagged::IsCFType
bool IsCFType() override
Definition: AppleObjCClassDescriptorV2.h:301
lldb_private::ClassDescriptorV2Tagged::ClassDescriptorV2Tagged
ClassDescriptorV2Tagged(ObjCLanguageRuntime::ClassDescriptorSP actual_class_sp, uint64_t u_payload, int64_t s_payload)
Definition: AppleObjCClassDescriptorV2.h:259
lldb_private::ClassDescriptorV2::ivar_list_t::m_count
uint32_t m_count
Definition: AppleObjCClassDescriptorV2.h:175
lldb_private::ClassDescriptorV2::Read_class_row
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
Definition: AppleObjCClassDescriptorV2.cpp:186
lldb_private::ClassDescriptorV2::class_ro_t::Read
bool Read(Process *process, lldb::addr_t addr)
Definition: AppleObjCClassDescriptorV2.cpp:128
lldb_private::ClassDescriptorV2Tagged::GetISA
ObjCLanguageRuntime::ObjCISA GetISA() override
Definition: AppleObjCClassDescriptorV2.h:333
lldb_private::ClassDescriptorV2::class_ro_t::m_weakIvarLayout_ptr
lldb::addr_t m_weakIvarLayout_ptr
Definition: AppleObjCClassDescriptorV2.h:113
lldb_private::ClassDescriptorV2::ivar_list_t::m_entsize
uint32_t m_entsize
Definition: AppleObjCClassDescriptorV2.h:174
lldb_private::ClassDescriptorV2::class_rw_t::m_ro_ptr
lldb::addr_t m_ro_ptr
Definition: AppleObjCClassDescriptorV2.h:125
lldb_private::ObjCLanguageRuntime::ClassDescriptorSP
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
Definition: ObjCLanguageRuntime.h:44
lldb_private::ClassDescriptorV2::ivar_t::m_type
std::string m_type
Definition: AppleObjCClassDescriptorV2.h:189
lldb_private::ClassDescriptorV2::objc_class_t::m_cache_ptr
lldb::addr_t m_cache_ptr
Definition: AppleObjCClassDescriptorV2.h:82
lldb_private::ClassDescriptorV2::GetISA
ObjCLanguageRuntime::ObjCISA GetISA() override
Definition: AppleObjCClassDescriptorV2.h:52
lldb_private::ClassDescriptorV2::GetSuperclass
ObjCLanguageRuntime::ClassDescriptorSP GetSuperclass() override
Definition: AppleObjCClassDescriptorV2.cpp:469
lldb_private::ClassDescriptorV2Tagged::m_name
ConstString m_name
Definition: AppleObjCClassDescriptorV2.h:349
lldb_private::ClassDescriptorV2::class_rw_t
Definition: AppleObjCClassDescriptorV2.h:121
lldb_private::ClassDescriptorV2::GetIVarInformation
void GetIVarInformation()
Definition: AppleObjCClassDescriptorV2.cpp:579
lldb_private::ClassDescriptorV2::iVarsStorage::iVarsStorage
iVarsStorage()
Definition: AppleObjCClassDescriptorV2.cpp:520
lldb_private::ClassDescriptorV2::objc_class_t::Clear
void Clear()
Definition: AppleObjCClassDescriptorV2.h:89
lldb_private::ClassDescriptorV2::class_ro_t::m_instanceSize
uint32_t m_instanceSize
Definition: AppleObjCClassDescriptorV2.h:104
lldb_private::ClassDescriptorV2Tagged
Definition: AppleObjCClassDescriptorV2.h:245
lldb_private::Process
Definition: Process.h:341
lldb_private::ClassDescriptorV2::method_list_t::m_entsize
uint16_t m_entsize
Definition: AppleObjCClassDescriptorV2.h:140
lldb_private::ClassDescriptorV2::class_ro_t::m_baseProtocols_ptr
lldb::addr_t m_baseProtocols_ptr
Definition: AppleObjCClassDescriptorV2.h:110
lldb_private::ClassDescriptorV2::GetInstanceSize
uint64_t GetInstanceSize() override
Definition: AppleObjCClassDescriptorV2.cpp:501
lldb_private::ClassDescriptorV2::class_ro_t::m_instanceStart
uint32_t m_instanceStart
Definition: AppleObjCClassDescriptorV2.h:103
lldb_private::ClassDescriptorV2::m_runtime
AppleObjCRuntimeV2 & m_runtime
Definition: AppleObjCClassDescriptorV2.h:236
lldb_private::AppleObjCRuntimeV2
Definition: AppleObjCRuntimeV2.h:25
lldb_private::ClassDescriptorV2::objc_class_t
Definition: AppleObjCClassDescriptorV2.h:79
lldb_private::ClassDescriptorV2::method_t::m_types_ptr
lldb::addr_t m_types_ptr
Definition: AppleObjCClassDescriptorV2.h:151
lldb_private::ClassDescriptorV2::~ClassDescriptorV2
~ClassDescriptorV2() override=default
lldb_private::ClassDescriptorV2::GetTaggedPointerInfoSigned
bool GetTaggedPointerInfoSigned(uint64_t *info_bits=nullptr, int64_t *value_bits=nullptr, uint64_t *payload=nullptr) override
Definition: AppleObjCClassDescriptorV2.h:44
lldb_private::ClassDescriptorV2::class_ro_t::m_baseProperties_ptr
lldb::addr_t m_baseProperties_ptr
Definition: AppleObjCClassDescriptorV2.h:114
lldb_private::ClassDescriptorV2::ivar_t::m_name_ptr
lldb::addr_t m_name_ptr
Definition: AppleObjCClassDescriptorV2.h:183
lldb_private::ClassDescriptorV2::iVarsStorage::size
size_t size()
Definition: AppleObjCClassDescriptorV2.cpp:522
lldb_private::ClassDescriptorV2::method_list_t::m_count
uint32_t m_count
Definition: AppleObjCClassDescriptorV2.h:143
lldb_private::ClassDescriptorV2::GetIVarAtIndex
iVarDescriptor GetIVarAtIndex(size_t idx) override
Definition: AppleObjCClassDescriptorV2.h:67
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::ClassDescriptorV2::class_rw_t::m_version
uint32_t m_version
Definition: AppleObjCClassDescriptorV2.h:123
lldb_private::ClassDescriptorV2::objc_class_t::m_data_ptr
lldb::addr_t m_data_ptr
Definition: AppleObjCClassDescriptorV2.h:84
lldb_private::ClassDescriptorV2Tagged::m_value_bits
uint64_t m_value_bits
Definition: AppleObjCClassDescriptorV2.h:353
lldb_private::ClassDescriptorV2Tagged::IsValid
bool IsValid() override
Definition: AppleObjCClassDescriptorV2.h:295
lldb_private::ClassDescriptorV2::m_ivars_storage
iVarsStorage m_ivars_storage
Definition: AppleObjCClassDescriptorV2.h:241
lldb_private::ClassDescriptorV2::IsValid
bool IsValid() override
Definition: AppleObjCClassDescriptorV2.h:33
lldb_private::ClassDescriptorV2Tagged::m_valid
bool m_valid
Definition: AppleObjCClassDescriptorV2.h:351
lldb_private::ClassDescriptorV2Tagged::GetTaggedPointerInfoSigned
bool GetTaggedPointerInfoSigned(uint64_t *info_bits=nullptr, int64_t *value_bits=nullptr, uint64_t *payload=nullptr) override
Definition: AppleObjCClassDescriptorV2.h:317
lldb_private::ClassDescriptorV2::method_t::GetSize
static size_t GetSize(Process *process, bool is_small)
Definition: AppleObjCClassDescriptorV2.h:157
lldb_private::ClassDescriptorV2::class_rw_t::m_properties_ptr
lldb::addr_t m_properties_ptr
Definition: AppleObjCClassDescriptorV2.h:130
lldb_private::ClassDescriptorV2::m_name
ConstString m_name
Definition: AppleObjCClassDescriptorV2.h:240
lldb_private::ClassDescriptorV2::class_ro_t
Definition: AppleObjCClassDescriptorV2.h:101
lldb_private::ClassDescriptorV2::method_t::Read
bool Read(Process *process, lldb::addr_t addr, lldb::addr_t relative_method_lists_base_addr, bool, bool)
Definition: AppleObjCClassDescriptorV2.cpp:254
lldb_private::ClassDescriptorV2::class_rw_t::m_protocols_ptr
lldb::addr_t m_protocols_ptr
Definition: AppleObjCClassDescriptorV2.h:131
lldb_private::ClassDescriptorV2::iVarsStorage::fill
void fill(AppleObjCRuntimeV2 &runtime, ClassDescriptorV2 &descriptor)
Definition: AppleObjCClassDescriptorV2.cpp:529
lldb_private::ClassDescriptorV2::class_rw_t::m_method_list_ptr
lldb::addr_t m_method_list_ptr
Definition: AppleObjCClassDescriptorV2.h:127
lldb_private::ClassDescriptorV2::class_ro_t::m_name
std::string m_name
Definition: AppleObjCClassDescriptorV2.h:116
lldb_private::ClassDescriptorV2::class_ro_t::m_baseMethods_ptr
lldb::addr_t m_baseMethods_ptr
Definition: AppleObjCClassDescriptorV2.h:109
lldb_private::ClassDescriptorV2::method_list_t::m_first_ptr
lldb::addr_t m_first_ptr
Definition: AppleObjCClassDescriptorV2.h:144
lldb_private::ClassDescriptorV2::GetTaggedPointerInfo
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...
Definition: AppleObjCClassDescriptorV2.h:38
lldb_private::ClassDescriptorV2::objc_class_t::Read
bool Read(Process *process, lldb::addr_t addr)
Definition: AppleObjCClassDescriptorV2.cpp:42
lldb_private::ClassDescriptorV2::method_list_t::Read
bool Read(Process *process, lldb::addr_t addr)
Definition: AppleObjCClassDescriptorV2.cpp:226
lldb_private::Process::GetAddressByteSize
uint32_t GetAddressByteSize() const
Definition: Process.cpp:3348
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::ClassDescriptorV2::method_t::m_imp_ptr
lldb::addr_t m_imp_ptr
Definition: AppleObjCClassDescriptorV2.h:152
lldb_private::ClassDescriptorV2::ivar_t::m_alignment
uint32_t m_alignment
Definition: AppleObjCClassDescriptorV2.h:185
lldb_private::ClassDescriptorV2::class_rw_t::m_nextSiblingClass
ObjCLanguageRuntime::ObjCISA m_nextSiblingClass
Definition: AppleObjCClassDescriptorV2.h:134
lldb_private::ClassDescriptorV2::ivar_t::GetSize
static size_t GetSize(Process *process)
Definition: AppleObjCClassDescriptorV2.h:191
lldb_private::ClassDescriptorV2::m_objc_class_ptr
lldb::addr_t m_objc_class_ptr
Definition: AppleObjCClassDescriptorV2.h:237
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::ClassDescriptorV2::Describe
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
Definition: AppleObjCClassDescriptorV2.cpp:360
lldb_private::ClassDescriptorV2::objc_class_t::m_vtable_ptr
lldb::addr_t m_vtable_ptr
Definition: AppleObjCClassDescriptorV2.h:83
lldb_private::ClassDescriptorV2::objc_class_t::m_isa
ObjCLanguageRuntime::ObjCISA m_isa
Definition: AppleObjCClassDescriptorV2.h:80
lldb_private::ClassDescriptorV2Tagged::GetClassName
ConstString GetClassName() override
Definition: AppleObjCClassDescriptorV2.h:280
lldb_private::ClassDescriptorV2::ClassDescriptorV2
ClassDescriptorV2(AppleObjCRuntimeV2 &runtime, ObjCLanguageRuntime::ObjCISA isa, const char *name)
Definition: AppleObjCClassDescriptorV2.h:223
lldb_private::ClassDescriptorV2Tagged::GetPayload
virtual uint64_t GetPayload()
Definition: AppleObjCClassDescriptorV2.h:346
lldb_private::ClassDescriptorV2::iVarsStorage
Definition: AppleObjCClassDescriptorV2.h:204
lldb_private::ClassDescriptorV2::ivar_list_t::Read
bool Read(Process *process, lldb::addr_t addr)
Definition: AppleObjCClassDescriptorV2.cpp:305
lldb-private.h
lldb_private::ClassDescriptorV2Tagged::m_info_bits
uint64_t m_info_bits
Definition: AppleObjCClassDescriptorV2.h:352
lldb_private::ClassDescriptorV2::iVarsStorage::operator[]
iVarDescriptor & operator[](size_t idx)
Definition: AppleObjCClassDescriptorV2.cpp:525
AppleObjCRuntimeV2.h
lldb_private::ClassDescriptorV2Tagged::m_value_bits_signed
int64_t m_value_bits_signed
Definition: AppleObjCClassDescriptorV2.h:354
lldb_private::ClassDescriptorV2Tagged::m_payload
uint64_t m_payload
Definition: AppleObjCClassDescriptorV2.h:355
lldb_private::ObjCLanguageRuntime::ClassDescriptor
Definition: ObjCLanguageRuntime.h:50
lldb_private::ClassDescriptorV2::method_list_t
Definition: AppleObjCClassDescriptorV2.h:139
uint32_t
lldb_private::ClassDescriptorV2::iVarsStorage::m_mutex
std::recursive_mutex m_mutex
Definition: AppleObjCClassDescriptorV2.h:217
lldb_private::ClassDescriptorV2::RW_REALIZED
static const uint32_t RW_REALIZED
Definition: AppleObjCClassDescriptorV2.h:77
lldb_private::ClassDescriptorV2::ivar_t::Read
bool Read(Process *process, lldb::addr_t addr)
Definition: AppleObjCClassDescriptorV2.cpp:329
lldb_private::ClassDescriptorV2::ivar_list_t
Definition: AppleObjCClassDescriptorV2.h:173
lldb_private::ClassDescriptorV2::method_t::m_name
std::string m_name
Definition: AppleObjCClassDescriptorV2.h:154
lldb_private::ClassDescriptorV2::class_rw_t::m_method_lists_ptr
lldb::addr_t m_method_lists_ptr
Definition: AppleObjCClassDescriptorV2.h:128
lldb_private::ObjCLanguageRuntime::ObjCISA
lldb::addr_t ObjCISA
Definition: ObjCLanguageRuntime.h:42
ObjCLanguageRuntime.h
lldb_private::ClassDescriptorV2::method_t
Definition: AppleObjCClassDescriptorV2.h:149
lldb_private::ObjCLanguageRuntime::ClassDescriptor::iVarDescriptor
Definition: ObjCLanguageRuntime.h:127
lldb_private::ClassDescriptorV2Tagged::GetSuperclass
ObjCLanguageRuntime::ClassDescriptorSP GetSuperclass() override
Definition: AppleObjCClassDescriptorV2.h:282
uint16_t
lldb_private::ClassDescriptorV2::ivar_t
Definition: AppleObjCClassDescriptorV2.h:181
lldb_private::ClassDescriptorV2::ivar_t::m_offset_ptr
lldb::addr_t m_offset_ptr
Definition: AppleObjCClassDescriptorV2.h:182
lldb_private::ClassDescriptorV2::class_rw_t::m_firstSubclass
ObjCLanguageRuntime::ObjCISA m_firstSubclass
Definition: AppleObjCClassDescriptorV2.h:133
lldb_private::ClassDescriptorV2Tagged::GetInfoBits
virtual uint64_t GetInfoBits()
Definition: AppleObjCClassDescriptorV2.h:344
lldb_private::ClassDescriptorV2::objc_class_t::m_flags
uint8_t m_flags
Definition: AppleObjCClassDescriptorV2.h:85
lldb_private::ClassDescriptorV2
Definition: AppleObjCClassDescriptorV2.h:21
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ClassDescriptorV2::method_t::m_types
std::string m_types
Definition: AppleObjCClassDescriptorV2.h:155
lldb_private::ClassDescriptorV2Tagged::~ClassDescriptorV2Tagged
~ClassDescriptorV2Tagged() override=default
lldb_private::ClassDescriptorV2Tagged::IsKVO
bool IsKVO() override
Definition: AppleObjCClassDescriptorV2.h:297
lldb_private::ClassDescriptorV2::ivar_t::m_type_ptr
lldb::addr_t m_type_ptr
Definition: AppleObjCClassDescriptorV2.h:184
lldb_private::ClassDescriptorV2::method_list_t::m_has_direct_selector
bool m_has_direct_selector
Definition: AppleObjCClassDescriptorV2.h:142
lldb_private::ClassDescriptorV2::GetClassName
ConstString GetClassName() override
Definition: AppleObjCClassDescriptorV2.cpp:449
lldb_private::ClassDescriptorV2::objc_class_t::objc_class_t
objc_class_t()=default
lldb_private::ClassDescriptorV2::method_list_t::m_is_small
bool m_is_small
Definition: AppleObjCClassDescriptorV2.h:141
lldb_private::ClassDescriptorV2::iVarsStorage::m_filled
bool m_filled
Definition: AppleObjCClassDescriptorV2.h:215
lldb_private::ClassDescriptorV2::class_ro_t::m_ivarLayout_ptr
lldb::addr_t m_ivarLayout_ptr
Definition: AppleObjCClassDescriptorV2.h:107
lldb_private::ClassDescriptorV2::class_ro_t::m_ivars_ptr
lldb::addr_t m_ivars_ptr
Definition: AppleObjCClassDescriptorV2.h:111
lldb_private::ClassDescriptorV2::class_rw_t::m_flags
uint32_t m_flags
Definition: AppleObjCClassDescriptorV2.h:122
lldb_private::ClassDescriptorV2::ivar_t::m_name
std::string m_name
Definition: AppleObjCClassDescriptorV2.h:188
lldb_private::ClassDescriptorV2::class_ro_t::m_name_ptr
lldb::addr_t m_name_ptr
Definition: AppleObjCClassDescriptorV2.h:108
lldb_private::ClassDescriptorV2::class_ro_t::m_reserved
uint32_t m_reserved
Definition: AppleObjCClassDescriptorV2.h:105
lldb_private::ClassDescriptorV2::Read_objc_class
bool Read_objc_class(Process *process, std::unique_ptr< objc_class_t > &objc_class) const
Definition: AppleObjCClassDescriptorV2.cpp:17
lldb_private::ClassDescriptorV2Tagged::GetValueBits
virtual uint64_t GetValueBits()
Definition: AppleObjCClassDescriptorV2.h:338
lldb_private::ClassDescriptorV2::GetNumIVars
size_t GetNumIVars() override
Definition: AppleObjCClassDescriptorV2.h:62
lldb_private::ClassDescriptorV2Tagged::GetValueBitsSigned
virtual int64_t GetValueBitsSigned()
Definition: AppleObjCClassDescriptorV2.h:340
lldb_private::ClassDescriptorV2::objc_class_t::m_superclass
ObjCLanguageRuntime::ObjCISA m_superclass
Definition: AppleObjCClassDescriptorV2.h:81
lldb_private::ClassDescriptorV2::ivar_list_t::m_first_ptr
lldb::addr_t m_first_ptr
Definition: AppleObjCClassDescriptorV2.h:176
lldb_private::ClassDescriptorV2::class_rw_t::Read
bool Read(Process *process, lldb::addr_t addr)
Definition: AppleObjCClassDescriptorV2.cpp:79
lldb_private::ClassDescriptorV2::iVarsStorage::m_ivars
std::vector< iVarDescriptor > m_ivars
Definition: AppleObjCClassDescriptorV2.h:216
lldb_private::ClassDescriptorV2Tagged::ClassDescriptorV2Tagged
ClassDescriptorV2Tagged(ConstString class_name, uint64_t payload)
Definition: AppleObjCClassDescriptorV2.h:247