[Lldb-commits] [PATCH] D23884: Add StructuredData unit tests; move packet processing into delegate.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 9 16:40:49 PDT 2016


zturner added inline comments.

================
Comment at: unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp:335
@@ +334,3 @@
+  StreamGDBRemote stream;
+  stream.PutEscapedBytes(json_packet.c_str(), json_packet.length());
+  stream.Flush();
----------------
tfiala wrote:
> zturner wrote:
> > Would be nice to see `PutEscapedBytes` updated to take a `StringRef`.  Every occurrence of passing `const char * str, int len` should be replaced with `StringRef` as we find occurrences of it.
> Yep.  I'd prefer to not make that part of this change, though.
Yea you are right, since the packets are coming in asynchronously I don't think we can make any assumptions about how long it will live.


https://reviews.llvm.org/D23884





More information about the lldb-commits mailing list