[lldb-dev] Inquiry about LLDB remote protocol
Greg Clayton via lldb-dev
lldb-dev at lists.llvm.org
Tue Mar 29 10:25:58 PDT 2016
> On Mar 29, 2016, at 2:57 AM, Ravitheja Addepally via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 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.
More information about the lldb-dev