[Lldb-commits] [PATCH] D39967: Disable breakpoints before writing memory and re-enable after.

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 22 14:42:55 PST 2018

zturner added a comment.

Personally I think it would be clearer to just use `std::unique_lock<>`.  Already it's locking the mutex twice, once with a `lock_guard` and once when creating a `BreakpointSiteList::Guard`.  Which works I guess because it's a recursive mutex, but it's still confusing.  I would vote to just make a `std::unique_lock` and then `return std::move(guard);`

It might be true that allowing the use of manual `lock` and `unlock` is unsafe, but adding additional code also has some cost.


More information about the lldb-commits mailing list