[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
Mon May 4 23:47:22 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:

Maybe this means this should be replaced by a tri-state enum? Did you try how that would look like?

Also, if you're matching `char` behavior, why is it necessary to include a new flag? Is it because the `char` code does not go through the string printer?

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


More information about the lldb-commits mailing list