m_quote('"'),
m_source_size(0),
m_needs_zero_termination(true),
- m_escape_non_printables(true)
+ m_escape_non_printables(true),
+ m_ignore_max_length(false)
{
}
return m_escape_non_printables;
}
+ ReadStringAndDumpToStreamOptions&
+ SetIgnoreMaxLength (bool e)
+ {
+ m_ignore_max_length = e;
+ return *this;
+ }
+
+ bool
+ GetIgnoreMaxLength () const
+ {
+ return m_ignore_max_length;
+ }
+
private:
uint64_t m_location;
lldb::ProcessSP m_process_sp;
uint32_t m_source_size;
bool m_needs_zero_termination;
bool m_escape_non_printables;
+ bool m_ignore_max_length;
};
class ReadBufferAndDumpToStreamOptions
#include "lldb/DataFormatters/CXXFormatterFunctions.h"
#include "lldb/DataFormatters/StringPrinter.h"
+#include "lldb/DataFormatters/TypeSummary.h"
#include "llvm/Support/ConvertUTF.h"
}
bool
-lldb_private::formatters::LibcxxStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions&)
+lldb_private::formatters::LibcxxStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& summary_options)
{
uint64_t size = 0;
ValueObjectSP location_sp((ValueObject*)nullptr);
return false;
DataExtractor extractor;
- size = std::min<decltype(size)>(size, valobj.GetTargetSP()->GetMaximumSizeOfStringSummary());
+ if (summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryCapped)
+ size = std::min<decltype(size)>(size, valobj.GetTargetSP()->GetMaximumSizeOfStringSummary());
location_sp->GetPointeeData(extractor, 0, size);
ReadBufferAndDumpToStreamOptions options(valobj);
}
bool
-lldb_private::formatters::NSStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options)
+lldb_private::formatters::NSStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& summary_options)
{
ProcessSP process_sp = valobj.GetProcessSP();
if (!process_sp)
options.SetQuote('"');
options.SetSourceSize(explicit_length);
options.SetNeedsZeroTermination(false);
+ options.SetIgnoreMaxLength(summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryUncapped);
return ReadStringAndDumpToStream<StringElementType::UTF16>(options);
}
else
options.SetPrefixToken('@');
options.SetSourceSize(explicit_length);
options.SetNeedsZeroTermination(false);
-
+ options.SetIgnoreMaxLength(summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryUncapped);
return ReadStringAndDumpToStream<StringElementType::ASCII>(options);
}
}
options.SetQuote('"');
options.SetSourceSize(explicit_length);
options.SetNeedsZeroTermination(has_explicit_length == false);
+ options.SetIgnoreMaxLength(summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryUncapped);
return ReadStringAndDumpToStream<StringElementType::UTF16> (options);
}
else if (is_special)
options.SetQuote('"');
options.SetSourceSize(explicit_length);
options.SetNeedsZeroTermination(has_explicit_length == false);
+ options.SetIgnoreMaxLength(summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryUncapped);
return ReadStringAndDumpToStream<StringElementType::UTF16> (options);
}
else if (is_inline)
options.SetStream(&stream);
options.SetPrefixToken('@');
options.SetSourceSize(explicit_length);
+ options.SetIgnoreMaxLength(summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryUncapped);
return ReadStringAndDumpToStream<StringElementType::ASCII>(options);
}
else
options.SetPrefixToken('@');
options.SetStream(&stream);
options.SetSourceSize(explicit_length);
+ options.SetIgnoreMaxLength(summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryUncapped);
return ReadStringAndDumpToStream<StringElementType::ASCII>(options);
}
}