25 return (60 - (13 * (4 - i)));
29 return (32 - (13 * (2 - i)));
38 m_backend.GetTargetSP()->GetArchitecture().GetAddressByteSize();
44 return m_impl.GetNumIndexes();
54 auto type_system =
m_backend.GetCompilerType().GetTypeSystem();
59 *
m_backend.GetExecutionContextRef().GetTargetSP());
80 if (!descriptor.get() || !descriptor->IsValid())
83 uint64_t info_bits(0), value_bits(0), payload(0);
85 if (descriptor->GetTaggedPointerInfo(&info_bits, &value_bits, &payload)) {
86 m_impl.m_inlined.SetIndexes(payload, *process_sp);
92 bool has_indexes(
false), has_length(
false);
94 for (
size_t x = 0; x < descriptor->GetNumIVars(); x++) {
95 const auto &ivar = descriptor->GetIVarAtIndex(x);
96 if (ivar.m_name == g__indexes) {
99 }
else if (ivar.m_name == g__length) {
104 if (has_length && has_indexes)
108 if (has_length && has_indexes) {
109 m_impl.m_outsourced.m_indexes =
111 .GetSyntheticChildAtOffset(_indexes_id.
m_offset,
118 m_impl.m_outsourced.m_count = length_sp->GetValueAsUnsigned(0);
119 if (
m_impl.m_outsourced.m_indexes)
132 return llvm::createStringError(
"Type has no child named '%s'",
135 uint32_t idx = *optional_idx;
137 return llvm::createStringError(
"Type has no child named '%s'",
169 return m_inlined.GetIndexAtIndex(idx, desired_type);
196 Scalar scalar((
unsigned long long)value.first);
199 Scalar scalar((
unsigned int)value.first);
206 idx_name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
238 static const uint64_t PACKED_INDEX_MASK = ((1 << 13) - 1);
static constexpr size_t PACKED_INDEX_SHIFT_32(size_t i)
static constexpr size_t PACKED_INDEX_SHIFT_64(size_t i)
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
llvm::Expected< uint32_t > CalculateNumChildren() override
struct NSIndexPathSyntheticFrontEnd::Impl m_impl
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
~NSIndexPathSyntheticFrontEnd() override=default
CompilerType m_uint_star_type
NSIndexPathSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
ObjCLanguageRuntime::ClassDescriptorSP m_descriptor_sp
llvm::Expected< size_t > GetIndexOfChildWithName(ConstString name) override
bool MightHaveChildren() override
lldb::ValueObjectSP GetSyntheticValue() override
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
static ObjCLanguageRuntime * Get(Process &process)
virtual ClassDescriptorSP GetClassDescriptor(ValueObject &in_value)
A plug-in interface definition class for debugging a process.
uint32_t GetAddressByteSize() const
static lldb::TypeSystemClangSP GetForTarget(Target &target, std::optional< IsolatedASTKind > ast_kind=DefaultAST, bool create_on_demand=true)
Returns the scratch TypeSystemClang for the given target.
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
uint32_t CalculateNumChildrenIgnoringErrors(uint32_t max=UINT32_MAX)
SyntheticChildrenFrontEnd(ValueObject &backend)
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS)
void SetCompilerType(const CompilerType &compiler_type)
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
@ eRefetch
Children need to be recomputed dynamically.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Process > ProcessSP
void SetIndexes(uint64_t value, Process &p)
size_t _lengthForInlinePayload(uint32_t ptr_size)
lldb::ValueObjectSP GetIndexAtIndex(size_t idx, const CompilerType &desired_type)
std::pair< uint64_t, bool > _indexAtPositionForInlinePayload(size_t pos)
lldb::ValueObjectSP GetIndexAtIndex(size_t idx)
lldb::ValueObjectSP GetIndexAtIndex(size_t idx, const CompilerType &desired_type)
struct OutsourcedIndexes m_outsourced
struct InlinedIndexes m_inlined