<div dir="ltr"><div><div>> Be sure to speak with myself, Jim Ingham and Pavel in depth before undertaking this task as there will be many changes required.<br><br></div>Definitely.<br><br>Thank you all for the responses. Will get back after digesting all the responses here.<br><br></div><div>Regards,<br></div><div>Ramana<br></div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 29, 2018 at 8:02 PM, Greg Clayton <span dir="ltr"><<a href="mailto:clayborg@gmail.com" target="_blank">clayborg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><span class=""><br><blockquote type="cite"><div>On Mar 29, 2018, at 2:08 AM, Ramana via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="m_-7348486729684083737Apple-interchange-newline"><div><div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>It appears that the lldb-server, as of v5.0, did not implement the GDB RSPs non-stop mode (<a href="https://sourceware.org/gdb/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-Non_002dStop" target="_blank">https://sourceware.org/gdb/<wbr>onlinedocs/gdb/Remote-Non_<wbr>002dStop.html#Remote-Non_<wbr>002dStop</a>). Am I wrong?<br><br></div>If the support is actually not there, what needs to be changed to enable the same in lldb-server?<br></div></div></div></div></div></div></blockquote><div><br></div></span>As Pavel said, adding support into lldb-server will be easy. Adding support to LLDB will be harder. One downside of enabling this mode will be a performance loss in the GDB remote packet transfer. Why? IIRC this mode requires a read thread where one thread is always reading packets and putting them into a packet buffer. Threads that want to send a packet an get a reply must not send the packet then use a condition variable + mutex to wait for the response. This threading overhead really slows down the packet transfers. Currently we have a mutex on the GDB remote communication where each thread that needs to send a packet will take the mutex and then send the packet and wait for the response on the same thread. I know the performance differences are large on MacOS, not sure how they are on other systems. If you do end up enabling this, please run the "process plugin packet speed-test" command which is available only when debugging with ProcessGDBRemote. It will send an receive various packets of various sizes and report speed statistics back to you.<span class=""><br><blockquote type="cite"><div><div dir="ltr"><div><div><div><div><br></div>Also, in lldb at least I see some code relevant to non-stop mode, but is non-stop mode fully implemented in lldb or there is only partial support?<br></div></div></div></div></div></blockquote><div><br></div></span>Everything in LLDB right now assumes a process centric debugging model where when one thread stops all threads are stopped. There will be quite a large amount of changes needed for a thread centric model. The biggest issue I know about is breakpoints. Any time you need to step over a breakpoint, you must stop all threads, disable the breakpoint, single step the thread and re-enable the breakpoint, then start all threads again. So even the thread centric model would need to start and stop all threads many times. </div><div><br></div><div>Be sure to speak with myself, Jim Ingham and Pavel in depth before undertaking this task as there will be many changes required.</div><div><br></div><div>Greg <br><blockquote type="cite"><div><div dir="ltr"><div><div><div><br></div></div><div></div>Thanks,<br></div>Ramana<br><div><div><div><div><div><br><br></div></div></div></div></div></div>
______________________________<wbr>_________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div></div></div></div>