Skip to content

Commit 158f0b2

Browse files
committed
fixup! add thread-safety comment
1 parent 1a1a557 commit 158f0b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lldb/include/lldb/Target/StackFrameList.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,15 @@ class StackFrameList {
175175
/// The currently selected frame. An optional is used to record whether anyone
176176
/// has set the selected frame on this stack yet. We only let recognizers
177177
/// change the frame if this is the first time GetSelectedFrame is called.
178+
///
179+
/// Thread-safety:
180+
/// This member is not protected by a mutex.
181+
/// LLDB really only should have an opinion about the selected frame index
182+
/// when a process stops, before control gets handed back to the user.
183+
/// After that, it's up to them to change it whenever they feel like it.
184+
/// If two parts of lldb decided they wanted to be in control of the selected
185+
/// frame index on stop the right way to fix it would need to be some explicit
186+
/// negotiation for who gets to control this.
178187
std::optional<uint32_t> m_selected_frame_idx;
179188

180189
/// The number of concrete frames fetched while filling the frame list. This

0 commit comments

Comments
 (0)