Go to the documentation of this file.
9 #ifndef LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCRUNTIMEV2_H
10 #define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCRUNTIMEV2_H
40 bool isA(
const void *ClassID)
const override {
45 return runtime->
isA(&
ID);
54 llvm::Expected<std::unique_ptr<UtilityFunction>>
64 const char *ivar_name)
override;
111 lldb::BreakpointResolverSP
113 bool throw_bp)
override;
135 const lldb::ModuleSP &objc_module_sp);
141 const lldb::ModuleSP &objc_module_sp,
142 uint64_t objc_debug_isa_class_mask,
143 uint64_t objc_debug_isa_magic_mask,
144 uint64_t objc_debug_isa_magic_value,
145 uint64_t objc_debug_indexed_isa_magic_mask,
146 uint64_t objc_debug_indexed_isa_magic_value,
147 uint64_t objc_debug_indexed_isa_index_mask,
148 uint64_t objc_debug_indexed_isa_index_shift,
154 std::map<ObjCISA, ObjCLanguageRuntime::ClassDescriptorSP>
m_cache;
181 const lldb::ModuleSP &objc_module_sp);
205 uint32_t objc_debug_taggedpointer_slot_shift,
206 uint32_t objc_debug_taggedpointer_slot_mask,
207 uint32_t objc_debug_taggedpointer_payload_lshift,
208 uint32_t objc_debug_taggedpointer_payload_rshift,
211 typedef std::map<uint8_t, ObjCLanguageRuntime::ClassDescriptorSP>
Cache;
238 uint64_t objc_debug_taggedpointer_ext_mask,
239 uint32_t objc_debug_taggedpointer_slot_shift,
240 uint32_t objc_debug_taggedpointer_ext_slot_shift,
241 uint32_t objc_debug_taggedpointer_slot_mask,
242 uint32_t objc_debug_taggedpointer_ext_slot_mask,
243 uint32_t objc_debug_taggedpointer_payload_lshift,
244 uint32_t objc_debug_taggedpointer_payload_rshift,
245 uint32_t objc_debug_taggedpointer_ext_payload_lshift,
246 uint32_t objc_debug_taggedpointer_ext_payload_rshift,
252 typedef std::map<uint8_t, ObjCLanguageRuntime::ClassDescriptorSP>
Cache;
299 return {
true, found};
343 std::unique_ptr<UtilityFunction>
374 std::unique_ptr<UtilityFunction>
444 #endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCRUNTIMEV2_H
bool isA(const void *ClassID) const override
ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa) override
lldb::addr_t m_buckets_ptr
NonPointerISACache(AppleObjCRuntimeV2 &runtime, const lldb::ModuleSP &objc_module_sp, uint64_t objc_debug_isa_class_mask, uint64_t objc_debug_isa_magic_mask, uint64_t objc_debug_isa_magic_value, uint64_t objc_debug_indexed_isa_magic_mask, uint64_t objc_debug_indexed_isa_magic_value, uint64_t objc_debug_indexed_isa_index_mask, uint64_t objc_debug_indexed_isa_index_shift, lldb::addr_t objc_indexed_classes)
lldb::addr_t GetTaggedPointerObfuscator()
const TaggedPointerVendorLegacy & operator=(const TaggedPointerVendorLegacy &)=delete
AppleObjCRuntimeV2 & m_runtime
TaggedPointerVendor * GetTaggedPointerVendor() override
~AppleObjCRuntimeV2() override=default
uint32_t m_objc_debug_taggedpointer_ext_payload_rshift
ObjCISA GetPointerISA(ObjCISA isa)
const TaggedPointerVendorRuntimeAssisted & operator=(const TaggedPointerVendorRuntimeAssisted &)=delete
ClassDescriptorSP GetClassDescriptor(ValueObject &in_value) override
ObjCRuntimeVersions GetRuntimeVersion() const override
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
Cache::iterator CacheIterator
void GetValuesForGlobalCFBooleans(lldb::addr_t &cf_true, lldb::addr_t &cf_false) override
ObjCLanguageRuntime::ClassDescriptorSP GetClassDescriptor(lldb::addr_t ptr) override
static NonPointerISACache * CreateInstance(AppleObjCRuntimeV2 &runtime, const lldb::ModuleSP &objc_module_sp)
lldb::addr_t m_tagged_pointer_obfuscator
lldb::addr_t GetSharedCacheReadOnlyAddress()
lldb::ModuleSP m_objc_module_sp
uint64_t m_objc_debug_isa_magic_value
bool IsTaggedPointer(lldb::addr_t ptr) override
std::shared_ptr< EncodingToType > EncodingToTypeSP
uint64_t m_objc_debug_taggedpointer_ext_mask
static DescriptorMapUpdateResult Success(uint32_t found)
void UpdateSignature(const RemoteNXMapTable &hash_table)
uint32_t m_objc_debug_taggedpointer_ext_slot_shift
uint64_t m_objc_debug_taggedpointer_mask
LanguageType
Programming language type.
const TaggedPointerVendorV2 & operator=(const TaggedPointerVendorV2 &)=delete
std::once_flag m_no_classes_cached_warning
lldb::addr_t m_isa_hash_table_ptr
static lldb_private::LanguageRuntime * CreateInstance(Process *process, lldb::LanguageType language)
SharedCacheClassInfoExtractor m_shared_cache_class_info_extractor
virtual bool isA(const void *ClassID) const
void SetRelativeSelectorBaseAddr(lldb::addr_t relative_selector_base)
llvm::Optional< std::pair< lldb::addr_t, lldb::addr_t > > m_CFBoolean_values
lldb::addr_t LookupRuntimeSymbol(ConstString name) override
std::unique_ptr< NonPointerISACache > m_non_pointer_isa_cache_up
static const ObjCLanguageRuntime::ObjCISA g_objc_Tagged_ISA
bool m_has_object_getClass
std::once_flag m_no_expanded_cache_warning
EncodingToTypeSP m_encoding_to_type_sp
lldb::addr_t m_objc_debug_taggedpointer_classes
lldb::addr_t m_relative_selector_base
static const ObjCLanguageRuntime::ObjCISA g_objc_Tagged_ISA_NSNumber
static const ObjCLanguageRuntime::ObjCISA g_objc_Tagged_ISA_NSManagedObject
bool m_has_objc_copyRealizedClassList
uint32_t m_objc_debug_taggedpointer_payload_lshift
static llvm::StringRef GetPluginNameStatic()
TaggedPointerVendorRuntimeAssisted(AppleObjCRuntimeV2 &runtime, uint64_t objc_debug_taggedpointer_mask, uint32_t objc_debug_taggedpointer_slot_shift, uint32_t objc_debug_taggedpointer_slot_mask, uint32_t objc_debug_taggedpointer_payload_lshift, uint32_t objc_debug_taggedpointer_payload_rshift, lldb::addr_t objc_debug_taggedpointer_classes)
lldb::addr_t GetISAHashTablePointer()
bool EvaluateNonPointerISA(ObjCISA isa, ObjCISA &ret_isa)
lldb::addr_t GetRelativeSelectorBaseAddr()
Returns the base address for relative method list selector strings.
bool IsPossibleExtendedTaggedPointer(lldb::addr_t ptr)
bool NeedsUpdate(Process *process, AppleObjCRuntimeV2 *runtime, RemoteNXMapTable &hash_table)
uint64_t m_objc_debug_indexed_isa_index_mask
~TaggedPointerVendorV2() override=default
uint64_t m_objc_debug_isa_class_mask
ObjCLanguageRuntime::ClassDescriptorSP GetClassDescriptor(ObjCISA isa)
NonPointerISACache * GetNonPointerIsaCache()
lldb::BreakpointResolverSP CreateExceptionResolver(const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp) override
uint32_t m_objc_debug_taggedpointer_ext_payload_lshift
void WarnIfNoClassesCached(SharedCacheWarningReason reason)
uint32_t m_objc_debug_taggedpointer_payload_rshift
ValueType
Type that describes Value::m_value.
std::unique_ptr< DeclVendor > m_decl_vendor_up
TaggedPointerVendorLegacy(AppleObjCRuntimeV2 &runtime)
std::map< uint8_t, ObjCLanguageRuntime::ClassDescriptorSP > Cache
AppleObjCRuntimeV2 & m_runtime
uint64_t m_realized_class_generation_count
static const ObjCLanguageRuntime::ObjCISA g_objc_Tagged_ISA_NSDate
string(SUBSTRING ${p} 10 -1 pStripped) if($
llvm::StringRef GetPluginName() override
uint64_t m_objc_debug_indexed_isa_index_shift
bool IsPossibleTaggedPointer(lldb::addr_t ptr) override
Cache::iterator CacheIterator
std::map< uint8_t, ObjCLanguageRuntime::ClassDescriptorSP > Cache
lldb::ModuleWP m_objc_module_wp
ObjCLanguageRuntime::ClassDescriptorSP GetClassDescriptor(lldb::addr_t ptr) override
DescriptorMapUpdateResult(bool ran, uint32_t found)
uint64_t m_objc_debug_indexed_isa_magic_value
bool IsPossibleTaggedPointer(lldb::addr_t ptr) override
std::vector< lldb::addr_t > m_indexed_isa_cache
bool isA(const void *ClassID) const override
uint32_t m_objc_debug_taggedpointer_slot_mask
std::map< ObjCISA, ObjCLanguageRuntime::ClassDescriptorSP > m_cache
llvm::Expected< std::unique_ptr< UtilityFunction > > CreateObjectChecker(std::string name, ExecutionContext &exe_ctx) override
uint64_t m_objc_debug_indexed_isa_magic_mask
@ eExpressionExecutionFailure
size_t GetByteOffsetForIvar(CompilerType &parent_qual_type, const char *ivar_name) override
std::unique_ptr< TaggedPointerVendor > m_tagged_pointer_vendor_up
const TaggedPointerVendorExtended & operator=(const TaggedPointerVendorExtended &)=delete
#define LLDB_INVALID_ADDRESS
const NonPointerISACache & operator=(const NonPointerISACache &)=delete
Generic representation of a type in a programming language.
EncodingToTypeSP GetEncodingToType() override
static DescriptorMapUpdateResult Fail()
HashTableSignature m_hash_signature
static TaggedPointerVendorV2 * CreateInstance(AppleObjCRuntimeV2 &runtime, const lldb::ModuleSP &objc_module_sp)
A class that represents a running process on the host machine.
DynamicClassInfoExtractor m_dynamic_class_info_extractor
static const ObjCLanguageRuntime::ObjCISA g_objc_Tagged_ISA_NSDateTS
lldb::addr_t GetSharedCacheBaseAddress()
static bool classof(const LanguageRuntime *runtime)
static const ObjCLanguageRuntime::ObjCISA g_objc_Tagged_ISA_NSAtom
uint64_t m_objc_debug_isa_magic_mask
uint32_t m_objc_debug_taggedpointer_slot_shift
Sometimes you can find the name of the type corresponding to an object, but we don't have debug infor...
void WarnIfNoExpandedSharedCache()
AppleObjCRuntimeV2(Process *process, const lldb::ModuleSP &objc_module_sp)
TaggedPointerVendorExtended(AppleObjCRuntimeV2 &runtime, uint64_t objc_debug_taggedpointer_mask, uint64_t objc_debug_taggedpointer_ext_mask, uint32_t objc_debug_taggedpointer_slot_shift, uint32_t objc_debug_taggedpointer_ext_slot_shift, uint32_t objc_debug_taggedpointer_slot_mask, uint32_t objc_debug_taggedpointer_ext_slot_mask, uint32_t objc_debug_taggedpointer_payload_lshift, uint32_t objc_debug_taggedpointer_payload_rshift, uint32_t objc_debug_taggedpointer_ext_payload_lshift, uint32_t objc_debug_taggedpointer_ext_payload_rshift, lldb::addr_t objc_debug_taggedpointer_classes, lldb::addr_t objc_debug_taggedpointer_ext_classes)
bool GetCFBooleanValuesIfNeeded()
uint32_t m_objc_debug_taggedpointer_ext_slot_mask
DeclVendor * GetDeclVendor() override
void UpdateISAToDescriptorMapIfNeeded() override
ObjCLanguageRuntime::ClassDescriptorSP GetClassDescriptor(lldb::addr_t ptr) override
bool RealizedClassGenerationCountChanged()
Update the generation count of realized classes.
TaggedPointerVendorV2(AppleObjCRuntimeV2 &runtime)
lldb::addr_t m_objc_debug_taggedpointer_ext_classes
bool HasSymbol(ConstString Name)
bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type) override
lldb::addr_t m_objc_indexed_classes
uint32_t ParseClassInfoArray(const lldb_private::DataExtractor &data, uint32_t num_class_infos)