[Lldb-commits] [lldb] [lldb] Trim and show embedded zeros in `charN_t` arrays (PR #195514)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed May 6 00:31:34 PDT 2026
================
@@ -95,6 +99,9 @@ class StringPrinter {
/// True iff a zero bytes ('\0') should terminate the memory region that
/// is being dumped.
bool m_zero_is_terminator = true;
+ /// True iff trailing zero bytes should be stripped from the string.
+ /// Mutually exclusive with `m_zero_is_terminator`.
----------------
labath wrote:
> It does go through the string printer, but it supplies an existing buffer that's already trimmed. The trimming is done here:
Okay, that makes sense. It might be interesting to see if we could unify the two codepaths, but I don't think that should be done in this PR.
> I did this in [0368645 (this PR)](https://github.com/llvm/llvm-project/pull/195514/commits/036864574f81998e47192f12ef83191a8e72e0a6).
Cool. I like the looks of that.
https://github.com/llvm/llvm-project/pull/195514
More information about the lldb-commits
mailing list