[lldb-dev] Inquiry about LLDB remote protocol

Ravitheja Addepally via lldb-dev lldb-dev at lists.llvm.org
Wed Mar 30 00:42:20 PDT 2016


Thank you all for the information.

On Tue, Mar 29, 2016 at 7:25 PM, Greg Clayton <gclayton at apple.com> wrote:

>
> > On Mar 29, 2016, at 2:57 AM, Ravitheja Addepally via lldb-dev <
> lldb-dev at lists.llvm.org> wrote:
> >
> > Hello,
> >       I wanted to know if the remote protocol of LLDB is state less or
> not ? When i say state I am referring to if LLDB remembers the current
> process or thread being debugged (which would mean we dont need to specify
> that in the client to server packets ) . I was looking at the
> GDBRemoteCommunicationServerLLGS and found that most of the packets did not
> have the pid or thread id being passed to the server , so is it safe to
> assume that the protocol is statefull ?
>
> Yes. There is the notion that you have one process that may or may not be
> there when you connect. When and if a process does exist, it assumes it
> won't change. Threads can be selected and many packets operate of the
> current thread. We have also added new packets to allow us to append a
> thread ID suffix to existing packets, like reading and writing registers.
> This allows us to save a packet round trip so we don't always have to say
> "set thread to thread 123" and then "read register 12".
>
> > is this assumption also valid for all OS's ?
>
> Yep. Very stateful.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160330/756a81f3/attachment.html>


More information about the lldb-dev mailing list