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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 12 04:59:46 PST 2020


labath added a comment.

Just one more thing I didn't catch in the previous round :(.



================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:461-481
+static void CollectRegNums(const RegisterInfo *reg_info,
+                           lldb_private::StreamString response) {
+  int i = 0;
+  for (const uint32_t *reg_num = reg_info->value_regs;
+       *reg_num != LLDB_INVALID_REGNUM; ++reg_num, ++i) {
+    if (i > 0)
+      response.PutChar(',');
----------------
Sorry I wasn't clear about this, but my idea was to make a _single_ utility function for this. If you pass in the `uint32_t*` to the function instead of the whole RegisterInfo struct, then you can use the same code in both places..


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

https://reviews.llvm.org/D74217





More information about the lldb-commits mailing list