clayborg added a comment.

The old mutex was there so that you could send a packet and get a result 
without worrying about other threads getting your response. It was recursive 
for the case where we needed to send two packets as one (set thread ID, then 
send packet), and for reading all registers (as you have found), so your patch 
does work, but it now only for these special cases. Now there is no way to 
easily take the mutex and send 5 different packets without going and adding new 
NoLock variants of each call that you might want to send as a single stream of 
packets. Can we think slightly cleaner way to do this? Before you could stake 
the sequence mutex in your main function that wanted to make N calls, and each 
call would then recursively lock the mutex and everything just worked. Now you 
will deadlock if you do things incorrectly (granted you will need to do a 
"GDBRemoteClientBase::Lock lock(gdb_comm, false);" followed by a 
"m_gdb_comm.SendSomePacket()".


https://reviews.llvm.org/D23802



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

Reply via email to