[Lldb-commits] [PATCH] D62221: [lldb-server][LLGS] Support 'g' packets

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 21 15:11:38 PDT 2019


clayborg added a comment.

Using 'g' packets seems fine to me and we might be able to just enable it. We will need to ensure that this doesn't regress stepping times so we will need to get people to try this out on their systems first. Most of our targets expedite enough registers in the stop reply packet where we don't need to read that many registers. Are you using lldb-server as your GDB remote binary or another GDB server?



================
Comment at: lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp:307-316
+#ifdef LLDB_REMOTE_SHOULD_READ_ALL_REGISTERS_AT_ONCE
+      // Always fetch the registers at once when the flag has been defined.
+      bool read_all_registers_at_once = true;
+#else
       // read_all_registers_at_once will be true if 'p' packet is not
       // supported.
       bool read_all_registers_at_once =
----------------
I would make this a gdb-remote setting like "plugin.process.gdb-remote.packet-timeout" but named "plugin.process.gdb-remote.use-g-packet". Then we don't need a #define. It would be fine to use this all the time for most targets I believe. So it might be worth trying this out. We will need to watch stepping times.


================
Comment at: lldb/source/Utility/StringExtractorGDBRemote.cpp:379-382
   case 'g':
-    if (packet_size == 1)
-      return eServerPacketType_g;
-    break;
----------------
What if another packet starts with 'g'?


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D62221





More information about the lldb-commits mailing list