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

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 13 10:27:20 PST 2026


================
@@ -37,10 +40,55 @@ using Id = uint64_t;
 /// the current session.
 static constexpr Id kCalculateSeq = UINT64_MAX;
 
+/// A wrapper around a 'std::string' to ensure the contents are valid utf8
+/// during serialization.
+class String {
+public:
+  String(std::string str) : m_str(str) {}
----------------
ashgti wrote:

>From my understanding, std::string isn't really meant to be subclassed. However, I added some additional helpers and conversion functions that help make it easier to work with.

LMKWYT

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


More information about the lldb-commits mailing list