LLDB  mainline
ObjCLanguageRuntime.cpp
Go to the documentation of this file.
1 //===-- ObjCLanguageRuntime.cpp -------------------------------------------===//
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 #include "clang/AST/Type.h"
9 
10 #include "ObjCLanguageRuntime.h"
11 
13 #include "lldb/Core/MappedHash.h"
14 #include "lldb/Core/Module.h"
16 #include "lldb/Core/ValueObject.h"
18 #include "lldb/Symbol/SymbolFile.h"
19 #include "lldb/Symbol/Type.h"
20 #include "lldb/Symbol/TypeList.h"
21 #include "lldb/Symbol/Variable.h"
22 #include "lldb/Target/ABI.h"
23 #include "lldb/Target/Target.h"
24 #include "lldb/Utility/LLDBLog.h"
25 #include "lldb/Utility/Log.h"
26 #include "lldb/Utility/Timer.h"
27 
28 #include "llvm/ADT/StringRef.h"
29 #include "llvm/Support/DJB.h"
30 
31 using namespace lldb;
32 using namespace lldb_private;
33 
35 
36 // Destructor
37 ObjCLanguageRuntime::~ObjCLanguageRuntime() = default;
38 
39 ObjCLanguageRuntime::ObjCLanguageRuntime(Process *process)
40  : LanguageRuntime(process), m_impl_cache(), m_impl_str_cache(),
41  m_has_new_literals_and_indexing(eLazyBoolCalculate),
42  m_isa_to_descriptor(), m_hash_to_isa_map(), m_type_size_cache(),
43  m_isa_to_descriptor_stop_id(UINT32_MAX), m_complete_class_cache(),
44  m_negative_complete_class_cache() {}
45 
47  static ConstString g_self = ConstString("self");
48  static ConstString g_cmd = ConstString("_cmd");
49  return name == g_self || name == g_cmd;
50 }
51 
53  const ClassDescriptorSP &descriptor_sp,
54  const char *class_name) {
55  if (isa != 0) {
56  m_isa_to_descriptor[isa] = descriptor_sp;
57  // class_name is assumed to be valid
58  m_hash_to_isa_map.insert(std::make_pair(llvm::djbHash(class_name), isa));
59  return true;
60  }
61  return false;
62 }
63 
65  lldb::addr_t selector,
66  lldb::addr_t impl_addr) {
67  Log *log = GetLog(LLDBLog::Step);
68  if (log) {
69  LLDB_LOGF(log,
70  "Caching: class 0x%" PRIx64 " selector 0x%" PRIx64
71  " implementation 0x%" PRIx64 ".",
72  class_addr, selector, impl_addr);
73  }
74  m_impl_cache.insert(std::pair<ClassAndSel, lldb::addr_t>(
75  ClassAndSel(class_addr, selector), impl_addr));
76 }
77 
79  llvm::StringRef sel_str,
80  lldb::addr_t impl_addr) {
81  Log *log = GetLog(LLDBLog::Step);
82 
83  LLDB_LOG(log, "Caching: class {0} selector {1} implementation {2}.",
84  class_addr, sel_str, impl_addr);
85 
86  m_impl_str_cache.insert(std::pair<ClassAndSelStr, lldb::addr_t>(
87  ClassAndSelStr(class_addr, sel_str), impl_addr));
88 }
89 
91  lldb::addr_t selector) {
92  MsgImplMap::iterator pos, end = m_impl_cache.end();
93  pos = m_impl_cache.find(ClassAndSel(class_addr, selector));
94  if (pos != end)
95  return (*pos).second;
96  return LLDB_INVALID_ADDRESS;
97 }
98 
100  llvm::StringRef sel_str) {
101  MsgImplStrMap::iterator pos, end = m_impl_str_cache.end();
102  pos = m_impl_str_cache.find(ClassAndSelStr(class_addr, sel_str));
103  if (pos != end)
104  return (*pos).second;
105  return LLDB_INVALID_ADDRESS;
106 }
107 
108 lldb::TypeSP
110  CompleteClassMap::iterator complete_class_iter =
111  m_complete_class_cache.find(name);
112 
113  if (complete_class_iter != m_complete_class_cache.end()) {
114  // Check the weak pointer to make sure the type hasn't been unloaded
115  TypeSP complete_type_sp(complete_class_iter->second.lock());
116 
117  if (complete_type_sp)
118  return complete_type_sp;
119  else
120  m_complete_class_cache.erase(name);
121  }
122 
123  if (m_negative_complete_class_cache.count(name) > 0)
124  return TypeSP();
125 
126  const ModuleList &modules = m_process->GetTarget().GetImages();
127 
128  SymbolContextList sc_list;
129  modules.FindSymbolsWithNameAndType(name, eSymbolTypeObjCClass, sc_list);
130  const size_t matching_symbols = sc_list.GetSize();
131 
132  if (matching_symbols) {
133  SymbolContext sc;
134 
135  sc_list.GetContextAtIndex(0, sc);
136 
137  ModuleSP module_sp(sc.module_sp);
138 
139  if (!module_sp)
140  return TypeSP();
141 
142  const bool exact_match = true;
143  const uint32_t max_matches = UINT32_MAX;
144  TypeList types;
145 
146  llvm::DenseSet<SymbolFile *> searched_symbol_files;
147  module_sp->FindTypes(name, exact_match, max_matches, searched_symbol_files,
148  types);
149 
150  for (uint32_t i = 0; i < types.GetSize(); ++i) {
151  TypeSP type_sp(types.GetTypeAtIndex(i));
152 
154  type_sp->GetForwardCompilerType())) {
155  if (TypePayloadClang(type_sp->GetPayload()).IsCompleteObjCClass()) {
156  m_complete_class_cache[name] = type_sp;
157  return type_sp;
158  }
159  }
160  }
161  }
162  m_negative_complete_class_cache.insert(name);
163  return TypeSP();
164 }
165 
167  const char *ivar_name) {
169 }
170 
172  lldb::addr_t value, uint32_t ptr_size, bool allow_NULLs, bool allow_tagged,
173  bool check_version_specific) const {
174  if (!value)
175  return allow_NULLs;
176  if ((value % 2) == 1 && allow_tagged)
177  return true;
178  if ((value % ptr_size) == 0)
179  return (check_version_specific ? CheckPointer(value, ptr_size) : true);
180  else
181  return false;
182 }
183 
187  if (pos != m_isa_to_descriptor.end())
188  return pos->first;
189  return 0;
190 }
191 
195 
196  if (name) {
198  if (m_hash_to_isa_map.empty()) {
199  // No name hashes were provided, we need to just linearly power through
200  // the names and find a match
201  for (ISAToDescriptorIterator pos = m_isa_to_descriptor.begin();
202  pos != end; ++pos) {
203  if (pos->second->GetClassName() == name)
204  return pos;
205  }
206  } else {
207  // Name hashes were provided, so use them to efficiently lookup name to
208  // isa/descriptor
209  const uint32_t name_hash = llvm::djbHash(name.GetStringRef());
210  std::pair<HashToISAIterator, HashToISAIterator> range =
211  m_hash_to_isa_map.equal_range(name_hash);
212  for (HashToISAIterator range_pos = range.first; range_pos != range.second;
213  ++range_pos) {
215  m_isa_to_descriptor.find(range_pos->second);
216  if (pos != m_isa_to_descriptor.end()) {
217  if (pos->second->GetClassName() == name)
218  return pos;
219  }
220  }
221  }
222  }
223  return end;
224 }
225 
229  if (update_if_needed)
231 
235 }
236 
239  ClassDescriptorSP objc_class_sp(GetClassDescriptorFromISA(isa));
240  if (objc_class_sp) {
241  ClassDescriptorSP objc_super_class_sp(objc_class_sp->GetSuperclass());
242  if (objc_super_class_sp)
243  return objc_super_class_sp->GetISA();
244  }
245  return 0;
246 }
247 
250  ConstString class_name) {
252  if (pos != m_isa_to_descriptor.end())
253  return pos->second;
254  return ClassDescriptorSP();
255 }
256 
259  ClassDescriptorSP objc_class_sp;
260  // if we get an invalid VO (which might still happen when playing around with
261  // pointers returned by the expression parser, don't consider this a valid
262  // ObjC object)
263  if (valobj.GetCompilerType().IsValid()) {
264  addr_t isa_pointer = valobj.GetPointerValue();
265  if (isa_pointer != LLDB_INVALID_ADDRESS) {
266  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
267 
268  Process *process = exe_ctx.GetProcessPtr();
269  if (process) {
270  Status error;
271  ObjCISA isa = process->ReadPointerFromMemory(isa_pointer, error);
272  if (isa != LLDB_INVALID_ADDRESS)
273  objc_class_sp = GetClassDescriptorFromISA(isa);
274  }
275  }
276  }
277  return objc_class_sp;
278 }
279 
283  GetClassDescriptor(valobj));
284  if (objc_class_sp) {
285  if (!objc_class_sp->IsKVO())
286  return objc_class_sp;
287 
288  ClassDescriptorSP non_kvo_objc_class_sp(objc_class_sp->GetSuperclass());
289  if (non_kvo_objc_class_sp && non_kvo_objc_class_sp->IsValid())
290  return non_kvo_objc_class_sp;
291  }
292  return ClassDescriptorSP();
293 }
294 
297  if (isa) {
299 
301  m_isa_to_descriptor.find(isa);
302  if (pos != m_isa_to_descriptor.end())
303  return pos->second;
304 
305  if (ABISP abi_sp = m_process->GetABI()) {
306  pos = m_isa_to_descriptor.find(abi_sp->FixCodeAddress(isa));
307  if (pos != m_isa_to_descriptor.end())
308  return pos->second;
309  }
310  }
311  return ClassDescriptorSP();
312 }
313 
316  if (isa) {
317  ClassDescriptorSP objc_class_sp = GetClassDescriptorFromISA(isa);
318  if (objc_class_sp && objc_class_sp->IsValid()) {
319  if (!objc_class_sp->IsKVO())
320  return objc_class_sp;
321 
322  ClassDescriptorSP non_kvo_objc_class_sp(objc_class_sp->GetSuperclass());
323  if (non_kvo_objc_class_sp && non_kvo_objc_class_sp->IsValid())
324  return non_kvo_objc_class_sp;
325  }
326  }
327  return ClassDescriptorSP();
328 }
329 
332  bool for_expression) {
333  if (m_scratch_ast_ctx_up)
334  return RealizeType(*m_scratch_ast_ctx_up, name, for_expression);
335  return CompilerType();
336 }
337 
339 
341  return nullptr;
342 }
343 
345  uint64_t &size) {
346  void *opaque_ptr = compiler_type.GetOpaqueQualType();
347  size = m_type_size_cache.Lookup(opaque_ptr);
348  // an ObjC object will at least have an ISA, so 0 is definitely not OK
349  if (size > 0)
350  return true;
351 
352  ClassDescriptorSP class_descriptor_sp =
354  if (!class_descriptor_sp)
355  return false;
356 
357  int32_t max_offset = INT32_MIN;
358  uint64_t sizeof_max = 0;
359  bool found = false;
360 
361  for (size_t idx = 0; idx < class_descriptor_sp->GetNumIVars(); idx++) {
362  const auto &ivar = class_descriptor_sp->GetIVarAtIndex(idx);
363  int32_t cur_offset = ivar.m_offset;
364  if (cur_offset > max_offset) {
365  max_offset = cur_offset;
366  sizeof_max = ivar.m_size;
367  found = true;
368  }
369  }
370 
371  size = 8 * (max_offset + sizeof_max);
372  if (found)
373  m_type_size_cache.Insert(opaque_ptr, size);
374 
375  return found;
376 }
377 
378 lldb::BreakpointPreconditionSP
380  bool throw_bp) {
381  if (language != eLanguageTypeObjC)
382  return lldb::BreakpointPreconditionSP();
383  if (!throw_bp)
384  return lldb::BreakpointPreconditionSP();
385  BreakpointPreconditionSP precondition_sp(
387  return precondition_sp;
388 }
389 
390 // Exception breakpoint Precondition class for ObjC:
392  const char *class_name) {
393  m_class_names.insert(class_name);
394 }
395 
397  default;
398 
400  StoppointCallbackContext &context) {
401  return true;
402 }
403 
405  Stream &stream, lldb::DescriptionLevel level) {}
406 
408  Args &args) {
409  Status error;
410  if (args.GetArgumentCount() > 0)
411  error.SetErrorString(
412  "The ObjC Exception breakpoint doesn't support extra options.");
413  return error;
414 }
415 
416 llvm::Optional<CompilerType>
418  CompilerType class_type;
419  bool is_pointer_type = false;
420 
421  if (TypeSystemClang::IsObjCObjectPointerType(base_type, &class_type))
422  is_pointer_type = true;
424  class_type = base_type;
425  else
426  return llvm::None;
427 
428  if (!class_type)
429  return llvm::None;
430 
431  ConstString class_name(class_type.GetTypeName());
432  if (!class_name)
433  return llvm::None;
434 
435  TypeSP complete_objc_class_type_sp = LookupInCompleteClassCache(class_name);
436  if (!complete_objc_class_type_sp)
437  return llvm::None;
438 
439  CompilerType complete_class(
440  complete_objc_class_type_sp->GetFullCompilerType());
441  if (complete_class.GetCompleteType()) {
442  if (is_pointer_type)
443  return complete_class.GetPointerType();
444  else
445  return complete_class;
446  }
447 
448  return llvm::None;
449 }
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::ObjCLanguageRuntime::GetByteOffsetForIvar
virtual size_t GetByteOffsetForIvar(CompilerType &parent_qual_type, const char *ivar_name)
Definition: ObjCLanguageRuntime.cpp:166
lldb_private::StoppointCallbackContext
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
Definition: StoppointCallbackContext.h:26
lldb_private::ObjCLanguageRuntime::GetNonKVOClassDescriptor
ClassDescriptorSP GetNonKVOClassDescriptor(ValueObject &in_value)
Definition: ObjCLanguageRuntime.cpp:281
lldb_private::ObjCLanguageRuntime::m_complete_class_cache
CompleteClassMap m_complete_class_cache
Definition: ObjCLanguageRuntime.h:439
lldb_private::ObjCLanguageRuntime::GetDescriptorIterator
ISAToDescriptorIterator GetDescriptorIterator(ConstString name)
Definition: ObjCLanguageRuntime.cpp:193
lldb_private::ObjCLanguageRuntime::ClassDescriptorSP
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
Definition: ObjCLanguageRuntime.h:45
lldb_private::ExecutionContext::GetProcessPtr
Process * GetProcessPtr() const
Returns a pointer to the process object.
Definition: ExecutionContext.cpp:206
lldb_private::ObjCLanguageRuntime::ObjCExceptionPrecondition::ObjCExceptionPrecondition
ObjCExceptionPrecondition()
MappedHash.h
lldb_private::ObjCLanguageRuntime::GetClassDescriptorFromClassName
virtual ClassDescriptorSP GetClassDescriptorFromClassName(ConstString class_name)
Definition: ObjCLanguageRuntime.cpp:249
lldb_private::ObjCLanguageRuntime::GetClassDescriptorFromISA
virtual ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa)
Definition: ObjCLanguageRuntime.cpp:296
lldb_private::ObjCLanguageRuntime::HashToISAIterator
HashToISAMap::iterator HashToISAIterator
Definition: ObjCLanguageRuntime.h:425
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:270
lldb_private::Process
Definition: Process.h:338
lldb_private::ObjCLanguageRuntime::EncodingToTypeSP
std::shared_ptr< EncodingToType > EncodingToTypeSP
Definition: ObjCLanguageRuntime.h:221
Module.h
lldb_private::Process::GetTarget
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1206
lldb_private::ObjCLanguageRuntime::ClassDescriptor::IsPointerValid
bool IsPointerValid(lldb::addr_t value, uint32_t ptr_size, bool allow_NULLs=false, bool allow_tagged=false, bool check_version_specific=false) const
Definition: ObjCLanguageRuntime.cpp:171
lldb_private::ValueObject::GetPointerValue
lldb::addr_t GetPointerValue(AddressType *address_type=nullptr)
Definition: ValueObject.cpp:1436
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::ObjCLanguageRuntime::GetISA
virtual ObjCISA GetISA(ConstString name)
Definition: ObjCLanguageRuntime.cpp:185
lldb_private::ObjCLanguageRuntime::GetBreakpointExceptionPrecondition
static lldb::BreakpointPreconditionSP GetBreakpointExceptionPrecondition(lldb::LanguageType language, bool throw_bp)
Definition: ObjCLanguageRuntime.cpp:379
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::SymbolContextList::GetContextAtIndex
bool GetContextAtIndex(size_t idx, SymbolContext &sc) const
Get accessor for a symbol context at index idx.
Definition: SymbolContext.cpp:1263
lldb_private::ObjCLanguageRuntime::m_impl_str_cache
MsgImplStrMap m_impl_str_cache
Definition: ObjCLanguageRuntime.h:429
lldb_private::CompilerType::GetOpaqueQualType
lldb::opaque_compiler_type_t GetOpaqueQualType() const
Definition: CompilerType.h:173
lldb_private::ObjCLanguageRuntime::GetTypeBitSize
bool GetTypeBitSize(const CompilerType &compiler_type, uint64_t &size) override
Definition: ObjCLanguageRuntime.cpp:344
lldb_private::TypeSystemClang::IsObjCObjectPointerType
static bool IsObjCObjectPointerType(const CompilerType &type, CompilerType *target_type=nullptr)
Definition: TypeSystemClang.cpp:3730
lldb_private::TypePayloadClang
The implementation of lldb::Type's m_payload field for TypeSystemClang.
Definition: TypeSystemClang.h:67
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Args
Definition: Args.h:33
lldb_private::TypeList::GetTypeAtIndex
lldb::TypeSP GetTypeAtIndex(uint32_t idx)
Definition: TypeList.cpp:66
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::SymbolContext
Definition: SymbolContext.h:33
ABI.h
lldb_private::Target::GetImages
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition: Target.h:938
lldb_private::ThreadSafeDenseMap::Lookup
_ValueType Lookup(_KeyType k)
Definition: ThreadSafeDenseMap.h:39
lldb_private::ObjCLanguageRuntime::GetParentClass
virtual ObjCISA GetParentClass(ObjCISA isa)
Definition: ObjCLanguageRuntime.cpp:238
lldb_private::ObjCLanguageRuntime::m_hash_to_isa_map
HashToISAMap m_hash_to_isa_map
Definition: ObjCLanguageRuntime.h:432
lldb_private::ModuleList::FindSymbolsWithNameAndType
void FindSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list) const
Definition: ModuleList.cpp:504
Target.h
lldb_private::ObjCLanguageRuntime::ObjCExceptionPrecondition::ConfigurePrecondition
Status ConfigurePrecondition(Args &args) override
Definition: ObjCLanguageRuntime.cpp:407
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache
lldb::TypeSP LookupInCompleteClassCache(ConstString &name)
Definition: ObjCLanguageRuntime.cpp:109
lldb_private::ObjCLanguageRuntime::GetRuntimeType
llvm::Optional< CompilerType > GetRuntimeType(CompilerType base_type) override
Definition: ObjCLanguageRuntime.cpp:417
ID
static char ID
Definition: IRDynamicChecks.cpp:33
lldb_private::ObjCLanguageRuntime::UpdateISAToDescriptorMap
void UpdateISAToDescriptorMap()
Definition: ObjCLanguageRuntime.h:285
lldb_private::ObjCLanguageRuntime::ObjCExceptionPrecondition::GetDescription
void GetDescription(Stream &stream, lldb::DescriptionLevel level) override
Definition: ObjCLanguageRuntime.cpp:404
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:202
lldb_private::ModuleList
Definition: ModuleList.h:81
Log.h
TypeSystemClang.h
lldb_private::TypeSystemClang::IsObjCObjectOrInterfaceType
static bool IsObjCObjectOrInterfaceType(const CompilerType &type)
Definition: TypeSystemClang.cpp:3487
lldb_private::ThreadSafeDenseMap::Insert
void Insert(_KeyType k, _ValueType v)
Definition: ThreadSafeDenseMap.h:29
lldb_private::Runtime::m_process
Process * m_process
Definition: Runtime.h:29
lldb_private::ObjCLanguageRuntime::m_impl_cache
MsgImplMap m_impl_cache
Definition: ObjCLanguageRuntime.h:428
lldb_private::ObjCLanguageRuntime::GetClassDescriptor
virtual ClassDescriptorSP GetClassDescriptor(ValueObject &in_value)
Definition: ObjCLanguageRuntime.cpp:258
Type.h
lldb_private::ObjCLanguageRuntime::EncodingToType::~EncodingToType
virtual ~EncodingToType()
lldb_private::ObjCLanguageRuntime::GetDescriptorIteratorPair
std::pair< ISAToDescriptorIterator, ISAToDescriptorIterator > GetDescriptorIteratorPair(bool update_if_needed=true)
Definition: ObjCLanguageRuntime.cpp:228
lldb_private::TypeList::GetSize
uint32_t GetSize() const
Definition: TypeList.cpp:60
lldb_private::ObjCLanguageRuntime::ObjCExceptionPrecondition::EvaluatePrecondition
bool EvaluatePrecondition(StoppointCallbackContext &context) override
Definition: ObjCLanguageRuntime.cpp:399
lldb_private::SymbolContextList::GetSize
uint32_t GetSize() const
Get accessor for a symbol context list size.
Definition: SymbolContext.cpp:1279
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::ObjCLanguageRuntime::IsAllowedRuntimeValue
bool IsAllowedRuntimeValue(ConstString name) override
Check whether the name is "self" or "_cmd" and should show up in "frame variable".
Definition: ObjCLanguageRuntime.cpp:46
Timer.h
lldb::eSymbolTypeObjCClass
@ eSymbolTypeObjCClass
Definition: lldb-enumerations.h:640
lldb_private::ValueObject::GetExecutionContextRef
const ExecutionContextRef & GetExecutionContextRef() const
Definition: ValueObject.h:330
lldb_private::LanguageRuntime
Definition: LanguageRuntime.h:60
lldb_private::ObjCLanguageRuntime::m_negative_complete_class_cache
CompleteClassSet m_negative_complete_class_cache
Definition: ObjCLanguageRuntime.h:455
lldb::eLanguageTypeObjC
@ eLanguageTypeObjC
Objective-C.
Definition: lldb-enumerations.h:453
LLDB_INVALID_IVAR_OFFSET
#define LLDB_INVALID_IVAR_OFFSET
Definition: lldb-defines.h:76
lldb_private::ObjCLanguageRuntime::AddClass
bool AddClass(ObjCISA isa, const ClassDescriptorSP &descriptor_sp)
Definition: ObjCLanguageRuntime.h:333
lldb_private::ObjCLanguageRuntime::m_isa_to_descriptor
ISAToDescriptorMap m_isa_to_descriptor
Definition: ObjCLanguageRuntime.h:431
lldb_private::LLDBLog::Step
@ Step
lldb_private::CompilerType::IsValid
bool IsValid() const
Definition: CompilerType.h:72
ValueObject.h
lldb_private::ObjCLanguageRuntime::UpdateISAToDescriptorMapIfNeeded
virtual void UpdateISAToDescriptorMapIfNeeded()=0
lldb_private::ObjCLanguageRuntime::EncodingToType::RealizeType
virtual CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name, bool for_expression)=0
lldb_private::CompilerType::GetCompleteType
bool GetCompleteType() const
Type Completion.
Definition: CompilerType.cpp:264
lldb_private::ObjCLanguageRuntime::GetEncodingToType
virtual EncodingToTypeSP GetEncodingToType()
Definition: ObjCLanguageRuntime.cpp:340
TypeList.h
lldb_private::ObjCLanguageRuntime::AddToMethodCache
void AddToMethodCache(lldb::addr_t class_addr, lldb::addr_t sel, lldb::addr_t impl_addr)
Definition: ObjCLanguageRuntime.cpp:64
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::CompilerType::GetPointerType
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
Definition: CompilerType.cpp:407
uint32_t
lldb_private::ObjCLanguageRuntime::ISAToDescriptorIterator
ISAToDescriptorMap::iterator ISAToDescriptorIterator
Definition: ObjCLanguageRuntime.h:424
lldb_private::TypeList::FindTypes
TypeList FindTypes(ConstString name)
lldb_private::ObjCLanguageRuntime::ObjCISA
lldb::addr_t ObjCISA
Definition: ObjCLanguageRuntime.h:43
lldb_private::TypePayloadClang::IsCompleteObjCClass
bool IsCompleteObjCClass()
Definition: TypeSystemClang.h:83
lldb_private::CompilerType::GetTypeName
ConstString GetTypeName() const
Definition: CompilerType.cpp:277
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::ValueObject::GetCompilerType
CompilerType GetCompilerType()
Definition: ValueObject.h:352
ObjCLanguageRuntime.h
lldb_private::SymbolContext::module_sp
lldb::ModuleSP module_sp
The Module for a given query.
Definition: SymbolContext.h:318
PluginManager.h
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:74
LLDB_LOG
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition: Log.h:263
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
SymbolContext.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb_private::ObjCLanguageRuntime::m_type_size_cache
TypeSizeCache m_type_size_cache
Definition: ObjCLanguageRuntime.h:433
lldb_private::TypeList
Definition: TypeList.h:20
lldb_private::Process::GetABI
const lldb::ABISP & GetABI()
Definition: Process.cpp:1482
lldb_private::Log
Definition: Log.h:48
lldb_private::Process::ReadPointerFromMemory
lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status &error)
Definition: Process.cpp:2084
lldb_private::ObjCLanguageRuntime::ObjCExceptionPrecondition::AddClassName
void AddClassName(const char *class_name)
Definition: ObjCLanguageRuntime.cpp:391
lldb_private::ObjCLanguageRuntime::ObjCExceptionPrecondition
Definition: ObjCLanguageRuntime.h:164
lldb_private::ObjCLanguageRuntime::ClassAndSel
Definition: ObjCLanguageRuntime.h:367
Variable.h
lldb_private::GetLog
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:235
lldb_private::Args::GetArgumentCount
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition: Args.h:118
lldb
Definition: SBAddress.h:15
lldb_private::ObjCLanguageRuntime::LookupInMethodCache
lldb::addr_t LookupInMethodCache(lldb::addr_t class_addr, lldb::addr_t sel)
Definition: ObjCLanguageRuntime.cpp:90
LLDBLog.h
SymbolFile.h
lldb_private::ObjCLanguageRuntime::ClassAndSelStr
Definition: ObjCLanguageRuntime.h:397
lldb_private::ObjCLanguageRuntime::ClassDescriptor::CheckPointer
virtual bool CheckPointer(lldb::addr_t value, uint32_t ptr_size) const
Definition: ObjCLanguageRuntime.h:106
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207