27 TypeSystemSP type_system) {
28 lldbassert(type_system &&
"type_system needs to be not NULL");
35 return type_system->GetBuiltinTypeForEncodingAndBitSize(
84 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingSint, 16);
87 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingSint, 32);
90 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingSint, 64);
93 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingSint, 8);
96 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint, 128);
99 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint, 16);
102 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint, 32);
105 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint, 64);
108 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint, 8);
121 return type_system->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint, 8);
162 bool is_signed =
false;
177 std::optional<uint64_t> container_size =
179 std::optional<uint64_t> element_size = element_type.
GetByteSize(exe_scope);
181 if (container_size && element_size && *element_size) {
182 if (*container_size % *element_size)
184 return *container_size / *element_size;
190namespace formatters {
207 auto offset = idx * *size;
209 idx_name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
255 auto synthetic_children =
257 if (!synthetic_children)
260 synthetic_children->Update();
265 size_t idx = 0, len = synthetic_children->CalculateNumChildren();
267 for (; idx < len; idx++) {
268 auto child_sp = synthetic_children->GetChildAtIndex(idx);
271 child_sp = child_sp->GetQualifiedRepresentationIfAvailable(
274 const char *child_value = child_sp->GetValueAsCString();
275 if (child_value && *child_value) {
277 s.
Printf(
"%s", child_value);
280 s.
Printf(
", %s", child_value);
static lldb::Format GetItemFormatForFormat(lldb::Format format, CompilerType element_type)
static CompilerType GetCompilerTypeForFormat(lldb::Format format, CompilerType element_type, TypeSystemSP type_system)
static size_t CalculateNumChildren(CompilerType container_type, CompilerType element_type, lldb_private::ExecutionContextScope *exe_scope=nullptr)
lldb::TypeSystemSP GetSharedPointer() const
Generic representation of a type in a programming language.
TypeSystemSPWrapper GetTypeSystem() const
Accessors.
std::optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
bool IsIntegerType(bool &is_signed) const
bool IsVectorType(CompilerType *element_type=nullptr, uint64_t *size=nullptr) const
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
CompilerType GetCompilerType()
lldb::ValueObjectSP GetSP()
lldb::Format GetFormat() const
virtual lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString())
A class that represents a running process on the host machine.
Format
Display format definitions.
@ eFormatCString
NULL terminated C strings.
@ eFormatCharArray
Print characters with no single quotes, used for character arrays that can contain non printable char...
@ eFormatInstruction
Disassemble an opcode.
@ eFormatVoid
Do not print this.
@ eFormatComplex
Floating point complex type.
@ eFormatHexFloat
ISO C99 hex float string.
@ eFormatOSType
OS character codes encoded into an integer 'PICT' 'text' etc...
@ eFormatAddressInfo
Describe what an address points to (func + offset.
@ eFormatCharPrintable
Only printable characters, '.' if not printable.
@ eFormatComplexInteger
Integer complex type.
@ eEncodingUint
unsigned integer
@ eEncodingSint
signed integer