Go to the documentation of this file.
27 lldbassert(type_system &&
"type_system needs to be not NULL");
159 bool is_signed =
false;
174 llvm::Optional<uint64_t> container_size =
176 llvm::Optional<uint64_t> element_size = element_type.
GetByteSize(exe_scope);
178 if (container_size && element_size && *element_size) {
179 if (*container_size % *element_size)
181 return *container_size / *element_size;
187 namespace formatters {
201 llvm::Optional<uint64_t> size = m_child_type.GetByteSize(
nullptr);
204 auto offset = idx * *size;
206 idx_name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
207 ValueObjectSP child_sp(m_backend.GetSyntheticChildAtOffset(
212 child_sp->SetFormat(m_item_format);
218 m_parent_format = m_backend.GetFormat();
243 size_t m_num_children = 0;
251 auto synthetic_children =
253 if (!synthetic_children)
256 synthetic_children->Update();
261 size_t idx = 0, len = synthetic_children->CalculateNumChildren();
263 for (; idx < len; idx++) {
264 auto child_sp = synthetic_children->GetChildAtIndex(idx);
267 child_sp = child_sp->GetQualifiedRepresentationIfAvailable(
270 const char *child_value = child_sp->GetValueAsCString();
271 if (child_value && *child_value) {
273 s.
Printf(
"%s", child_value);
276 s.
Printf(
", %s", child_value);
@ eFormatOSType
OS character codes encoded into an integer 'PICT' 'text' etc...
Format
Display format definitions.
bool IsVectorType(CompilerType *element_type=nullptr, uint64_t *size=nullptr) const
@ eFormatInstruction
Disassemble an opcode.
static size_t CalculateNumChildren(CompilerType container_type, CompilerType element_type, lldb_private::ExecutionContextScope *exe_scope=nullptr)
llvm::Optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
llvm::StringRef GetString() const
virtual CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size)=0
@ eEncodingSint
signed integer
lldb::ValueObjectSP GetSP()
@ eEncodingUint
unsigned integer
bool IsIntegerType(bool &is_signed) const
@ eFormatHexFloat
ISO C99 hex float string.
@ eFormatVoid
Do not print this.
static CompilerType GetCompilerTypeForFormat(lldb::Format format, CompilerType element_type, TypeSystem *type_system)
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
static lldb::Format GetItemFormatForFormat(lldb::Format format, CompilerType element_type)
@ eFormatCString
NULL terminated C strings.
TypeSystem * GetTypeSystem() const
Accessors.
@ eFormatCharPrintable
Only printable characters, '.' if not printable.
@ eFormatCharArray
Print characters with no single quotes, used for character arrays that can contain non printable char...
const char * GetCString() const
Get the string value as a C string.
Generic representation of a type in a programming language.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
@ eFormatComplexInteger
Integer complex type.
A class that represents a running process on the host machine.
Interface for representing a type system.
virtual uint32_t GetPointerByteSize()=0
virtual CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type)=0
@ eFormatAddressInfo
Describe what an address points to (func + offset.
@ eFormatComplex
Floating point complex type.