[Lldb-commits] [lldb] [lldb] Add a packet-test-delay setting for testing slow connections (PR #195440)

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue May 5 04:47:19 PDT 2026


Teemperor wrote:

> You sometimes say packet and sometimes say package. Either package means a bundle of packets or you should be saying packet in all cases.

We debugged this and apparently these words have the same meaning in whatever mix of languages I use in my brain. I'll change it to packet for consistency.

> What are the options for this? I think you would need to simulate the network latency, which seems like a task for which tools will exist, but I don't have experience with them myself.

This patch i just the result of me asking "How can I emulate the device communication in LLDB without actually connecting to one?" and the consensus was that everyone just adds a delay to this function. I don't know if there is a better way to do this, and 

> 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.

I also vaguely remember but I couldn't find it when I wrote the patch. However, now that I look at it, I realise those two classes are anyway part of the same Plugin so we could probably just ask the same Plugin properties when sending a package. I'll take a look at if that's maybe a neater solution.

https://github.com/llvm/llvm-project/pull/195440


More information about the lldb-commits mailing list