[Lldb-commits] [PATCH] D39967: Refactoring of MemoryWrite function
Tatyana Krasnukha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 22 00:47:42 PST 2018
tatyana-krasnukha updated this revision to Diff 135370.
tatyana-krasnukha added a comment.
Herald added a subscriber: mgorny.
Disable breakpoints before writing memory and re-enable after.
I found that bp_site_list filled by BreakpointSiteList::FindInRange has its own mutex and doesn’t hold mutex of original list. Thus changed return type to Guard to avoid potential races.
Also, working on tests, I found that the trick (when breakpoint overlaps bottom end of the range) in BreakpointSiteList::FindInRange doesn’t work if that breakpoint is last in container: in this case m_bp_site_list.lower_bound returns end and iterator doesn’t pass next check. So, I moved the check after code that grabs previous element.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 25046 bytes
Desc: not available
More information about the lldb-commits