diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2012-05-31 22:56:36 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2012-05-31 22:56:36 +0000 |
| commit | 7385a5ae0b8d8de1ccc73552e2eb97675678f52c (patch) | |
| tree | 6bb9864fea22ef95b392deb352f7e870eef85815 /lldb/source/Target | |
| parent | 7d00061d876f91f4f82343113336b5735e670460 (diff) | |
| download | bcm5719-llvm-7385a5ae0b8d8de1ccc73552e2eb97675678f52c.tar.gz bcm5719-llvm-7385a5ae0b8d8de1ccc73552e2eb97675678f52c.zip | |
Thread-hardening the SB API calls related to watchpoint operations.
llvm-svn: 157776
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 7f8ae45a8d0..0fce9ae06d8 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -483,6 +483,10 @@ Target::CreateWatchpoint(lldb::addr_t addr, size_t size, uint32_t type) // Currently we only support one watchpoint per address, with total number // of watchpoints limited by the hardware which the inferior is running on. + + // Grab the list mutex while doing operations. + Mutex::Locker locker; + this->GetWatchpointList().GetListMutex(locker); WatchpointSP matched_sp = m_watchpoint_list.FindByAddress(addr); if (matched_sp) { |

