clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed.
Maybe instead of "NoLock" on the functions we those functions take an extra argument? Then someone can't accidentally run one of those without locking. We need to somehow enforce that locking must occur. Maybe passing an extra: const GDBRemoteClientBase::Lock &lock Making it const can stop people from locking it in the NoLock functions, and we can maybe assert: bool GDBRemoteCommunicationClient::SetCurrentThread(uint64_t tid, const GDBRemoteClientBase::Lock &lock) { assert(lock.IsAcquired()); Then IsAcquired() can be const, but this at least would enforce that someone needs to lock before sending the packet. We probably need to document these no locking commands and let users know they must lock and pass in the lock for verification. https://reviews.llvm.org/D23802 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits