Skip to content

Commit 119262e

Browse files
committed
Make the BreakpointLocationCollection mutex recursive
1 parent ffccec4 commit 119262e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class BreakpointLocationCollection {
3232

3333
~BreakpointLocationCollection();
3434

35-
BreakpointLocationCollection &operator=(const BreakpointLocationCollection &rhs);
35+
BreakpointLocationCollection &
36+
operator=(const BreakpointLocationCollection &rhs);
3637

3738
/// Add the breakpoint \a bp_loc_sp to the list.
3839
///
@@ -172,14 +173,14 @@ class BreakpointLocationCollection {
172173
lldb::break_id_t break_loc_id) const;
173174

174175
collection m_break_loc_collection;
175-
mutable std::mutex m_collection_mutex;
176+
mutable std::recursive_mutex m_collection_mutex;
176177
/// These are used if we're preserving breakpoints in this list:
177178
const bool m_preserving_bkpts = false;
178179
std::map<std::pair<lldb::break_id_t, lldb::break_id_t>, lldb::BreakpointSP>
179180
m_preserved_bps;
180181

181182
public:
182-
typedef LockingAdaptedIterable<std::mutex, collection>
183+
typedef LockingAdaptedIterable<std::recursive_mutex, collection>
183184
BreakpointLocationCollectionIterable;
184185
BreakpointLocationCollectionIterable BreakpointLocations() {
185186
return BreakpointLocationCollectionIterable(m_break_loc_collection,

0 commit comments

Comments
 (0)