> On Mar 29, 2016, at 2:57 AM, Ravitheja Addepally via lldb-dev 
> <lldb-dev@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.

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to