[lldb-dev] GDB RSPs non-stop mode capability in v5.0

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Thu Mar 29 03:34:12 PDT 2018


Hi,





On Thu, 29 Mar 2018 at 10:09, Ramana via lldb-dev <lldb-dev at lists.llvm.org>
wrote:

> Hi,
>
> It appears that the lldb-server, as of v5.0, did not implement the GDB
> RSPs non-stop mode (
> https://sourceware.org/gdb/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-Non_002dStop).
> Am I wrong?
>
> The non-stop project was started a couple of years ago, but never really
completed. There is some code left in the client which gives off the
impression it is supported, but in reality, that's probably not the case.
Furthermore, given the lack of test coverage, there's no way to tell if
even the bits of functionality that were working in the past, are still
operational. As for lldb-server, it does not support non-stop mode at all
(and has never supported it).


If the support is actually not there, what needs to be changed to enable
> the same in lldb-server?
>
Adding non-stop support to lldb-server should be relatively
straight-forward actually. For linux, the ptrace api natively operates in
"non-stop" mode, and we have to do extra work to the simulate the all-stop
mode. There are some details that we would need to figure out, but
conceptually, all you would need to do is rip out the all-stop simulation
code for this mode (NativeProcessLinux::StopRunningThreads,
NativeProcessLinux::SignalIfAllThreadsStopped), etc.). If you're interested
in taking this on, we can discuss it in more detail...

In my mind, the tricky part will be the client, as it contains a lot more
code, and a lot of that code assumes that the when
Process.GetState()==Stopped, that all threads are stopped as well. Jim
Ingham should have the best idea of the kind of work that needs to be done
there.

Hope this makes the situation a bit more clear.

cheers,
pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180329/2390d52f/attachment.html>


More information about the lldb-dev mailing list