augusto2112 added inline comments.
================ Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:344 + // TODO: Make the polling interval configurable. + std::chrono::milliseconds polling_interval = std::chrono::seconds(1); + ---------------- clayborg wrote: > We probably want this to be quite a bit shorter than 1 second. Why? Because > if you don't find the process right away, 1 second is a long time for the > system to wait and your program can execute quite a few instructions in 1 > second. By the time you attach, you might have missed your breakpoint at > main. Nothing will guarantee hitting a breakpoint, but I would suggest making > a smaller timeout, maybe like 1 millisecond. It would be good to benchmark > this a bit by waiting for a process and not launching a new process to see > how much CPU lldb-server takes up with a shorter timeout. > > Adding a command line option might be nice is someone could specify > "--wait-poll-msec 0" to constantly poll the system as fast as possible in > case they do need to catch the process as early as possible. > Adding a command line option might be nice is someone could specify > "--wait-poll-msec 0" to constantly poll the system as fast as possible in > case they do need to catch the process as early as possible. It looks like there already is an option like what you're describing on debugserver: "waitfor-interval". As well as another related flag: "waitfor-duration". I'll try implementing them in this patch as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93895/new/ https://reviews.llvm.org/D93895 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits