felipepiovezan wrote:

> This patch also required wrapping SendPacketAndWaitForResponse so we can sync 
> this setting on a per-package basis for the GDBRemoteCommunication class. 
> Without this, we could only set the delay before connecting and then never 
> change afterwards which would make this feature less useful and writing a 
> simple test impossible.

I don't think this is quite true, you should be able to have a callback that 
updates the `GDBRemoteCommunication` class when the setting is changed. Last 
time I looked into it, the callback mechanism exists, and I think it should 
work as long as your setting is not experimental (experimental settings are 
very very broken). Please have a look at this, it would reduce the diff of this 
patch, or at least its surface area, by quite a lot.

> I wonder what effort is required for that vs. putting this into lldb itself.

This patch is essentially two lines of code, I think it's hard to beat this 
amount of effort :)

```diff
+  if (m_packet_test_delay.count() > 0)
+    std::this_thread::sleep_for(m_packet_test_delay);
```



https://github.com/llvm/llvm-project/pull/195440
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to