[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.
https://reviews.llvm.org/D39967
Files:
include/lldb/Breakpoint/BreakpointSiteList.h
source/Breakpoint/BreakpointSiteList.cpp
source/Target/Process.cpp
unittests/Process/CMakeLists.txt
unittests/Process/common/
unittests/Process/common/CMakeLists.txt
unittests/Process/common/ProcessWriteMemoryTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39967.135370.patch
Type: text/x-patch
Size: 25046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180222/7d14bce5/attachment-0001.bin>
More information about the lldb-commits
mailing list