[Lldb-commits] [lldb] [LLDB] Consolidate C++ string buffer summaries (PR #144258)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 16 10:43:46 PDT 2025


================
@@ -43,6 +44,35 @@ bool Char32SummaryProvider(ValueObject &valobj, Stream &stream,
 bool WCharSummaryProvider(ValueObject &valobj, Stream &stream,
                           const TypeSummaryOptions &options); // wchar_t
 
+std::optional<uint64_t> GetWCharByteSize(Target &target);
+
+/// Print a summary for a string buffer to \a stream.
+///
+/// \param[in] stream
+///     The output stream to print the summary to.
+///
+/// \param[in] summary_options
+///     Options for printing the string contents. This function respects the
+///     capping.
+///
+/// \param[in] location_sp
+///     A pointer to a string buffer. It doesn't need to be null-terminated.
+///     The size is given by \a size.
----------------
Michael137 wrote:

I find `location_sp` to be quite a confusing name for this. You didn't come up with the name so I won't make you change this parameter. (could do it in a separate change)

But could we reword the explanation to something like:
```suggestion
///     ValueObject of a pointer to the string being printed.
```

https://github.com/llvm/llvm-project/pull/144258


More information about the lldb-commits mailing list