[Lldb-commits] [PATCH] D74217: Add target.xml support for qXfer request.

Jaroslav Sevcik via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 17 22:43:24 PST 2020


jarin added inline comments.


================
Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py:69
+            self.assertEqual(q_info_reg["offset"], xml_info_reg.get("offset"))
+            self.assertEqual(q_info_reg["encoding"], xml_info_reg.get("encoding"))
----------------
Why don't you test all the fields here?


================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2814
+    if (!encoding.empty())
+      response.Printf("encoding=\"%s\" ", encoding.str().c_str());
+
----------------
labath wrote:
> Similarly, `response << "encoding='" << encoding << "' "`, or `response.Format("encoding='{0}'", encoding)` would be shorter, and avoid string copying.
Nit: Now it is a funny mixture of operator<<, Printfs and PutCString. Is there a reason not to use << for everything? (I guess PutHex8 can't be easily done with <<, but everything else can?)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74217/new/

https://reviews.llvm.org/D74217





More information about the lldb-commits mailing list