[Lldb-commits] [PATCH] D102085: Add an "interrupt timeout" to Process, fix a bug in handling interrupt timeouts in

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 10 11:07:43 PDT 2021


clayborg added a comment.

Thanks for combining the functions and fine not to use Optional is we have a good value to indicate no timeout.

Just one inline comment where we can hopefully get rid of kWakeupInterval being a constant.



================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp:56
   for (;;) {
-    PacketResult read_result = ReadPacket(response, kInterruptTimeout, false);
+    PacketResult read_result = ReadPacket(response, kWakeupInterval, false);
     switch (read_result) {
----------------
Should we tailor this timeout a bit better to be related to the time left until we reach m_interrupt_endpoint? If we set the interrupt timeout to 1 second, we will wait for 5 seconds before we return. Maybe this should be calculated by subtracting m_interrupt_endpoint from steady_clock::now()?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102085



More information about the lldb-commits mailing list