11#include "llvm/Support/ConvertUTF.h"
37static constexpr std::pair<const char *, Format>
40 case StringElementType::UTF8:
42 case StringElementType::UTF16:
44 case StringElementType::UTF32:
51template <StringElementType ElemType>
64 stream.
Printf(
"Summary Unavailable");
69template <StringElementType ElemType>
85 stream.
Printf(
"%s ", value.c_str());
87 options.
SetData(std::move(data));
122 const uint32_t wchar_size = *size;
130 switch (wchar_size) {
141 stream.
Printf(
"size for wchar_t is not valid");
175 const uint32_t wchar_size = *size;
178 options.
SetData(std::move(data));
185 switch (wchar_size) {
196 stream.
Printf(
"size for wchar_t is not valid");
202std::optional<uint64_t>
204 return llvm::expectedToOptional(
210template <StringPr
inter::StringElementType element_type>
227 const auto max_size =
228 location_sp->GetTargetSP()->GetMaximumSizeOfStringSummary();
229 if (size > max_size) {
237 const size_t bytes_read = location_sp->GetPointeeData(extractor, 0, size);
238 if (bytes_read < size)
241 options.
SetData(std::move(extractor));
244 if (prefix_token.empty())
static llvm::raw_ostream & error(Stream &strm)
static constexpr std::pair< const char *, Format > getElementTraits(StringElementType ElemType)
static bool CharSummaryProvider(ValueObject &valobj, Stream &stream)
static bool CharStringSummaryProvider(ValueObject &valobj, Stream &stream)
StringPrinter::StringElementType StringElementType
A section + offset based address class.
bool IsValid() const
Check if the object state is valid.
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const
Create related types using the current type's AST.
llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
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.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
lldb::TypeSummaryCapping GetCapping() const
virtual uint64_t GetData(DataExtractor &data, Status &error)
CompilerType GetCompilerType()
lldb::TargetSP GetTargetSP() const
virtual const char * GetValueAsCString()
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP