diff options
author | emaste <emaste@FreeBSD.org> | 2013-12-03 22:13:33 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2013-12-03 22:13:33 +0000 |
commit | f087960a1097db2a1ef14a88963f8785df239aaa (patch) | |
tree | 44fecbbf159dd7e549aa3a3fb2ca48e10dc3c51e /source/Breakpoint/BreakpointLocationList.cpp | |
parent | 0f31a1ef7ecf609d469ee5b34b3f0cb24ae3492d (diff) | |
download | FreeBSD-src-f087960a1097db2a1ef14a88963f8785df239aaa.zip FreeBSD-src-f087960a1097db2a1ef14a88963f8785df239aaa.tar.gz |
Import lldb as of SVN r196322 (git 49c127ae)
(A number of files not required for the FreeBSD build have been removed.)
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Breakpoint/BreakpointLocationList.cpp')
-rw-r--r-- | source/Breakpoint/BreakpointLocationList.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/Breakpoint/BreakpointLocationList.cpp b/source/Breakpoint/BreakpointLocationList.cpp index 0c4c54d..18147de 100644 --- a/source/Breakpoint/BreakpointLocationList.cpp +++ b/source/Breakpoint/BreakpointLocationList.cpp @@ -86,16 +86,13 @@ Compare (BreakpointLocationSP lhs, lldb::break_id_t val) BreakpointLocationSP BreakpointLocationList::FindByID (lldb::break_id_t break_id) const { - BreakpointLocationSP bp_loc_sp; Mutex::Locker locker (m_mutex); - - collection::const_iterator begin = m_locations.begin(), end = m_locations.end(); - collection::const_iterator result; - result = std::lower_bound(begin, end, break_id, Compare); - if (result == end) - return bp_loc_sp; + collection::const_iterator end = m_locations.end(); + collection::const_iterator pos = std::lower_bound(m_locations.begin(), end, break_id, Compare); + if (pos != end && (*pos)->GetID() == break_id) + return *(pos); else - return *(result); + return BreakpointLocationSP(); } size_t |