[Lldb-commits] [lldb] [lldb-dap] Validate utf8 protocol messages. (PR #181261)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 12 15:48:57 PST 2026


================
@@ -37,6 +38,24 @@ using Id = uint64_t;
 /// the current session.
 static constexpr Id kCalculateSeq = UINT64_MAX;
 
+/// A wrapper around a string to ensure the contents are sanitized as utf8
+/// during serialization. This value should be used for any strings that may
+/// contain raw data like variable values.
+class SanitizedString {
----------------
ashgti wrote:

How about simply `String` then? Its in the `protocol` namespace, so it should be isolated.

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


More information about the lldb-commits mailing list