Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions lldb/packages/Python/lldbsuite/test/lldbutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,16 @@ def get_threads_stopped_at_breakpoint_id(process, bpid):
return threads

for thread in stopped_threads:
# Make sure we've hit our breakpoint...
break_id = thread.GetStopReasonDataAtIndex(0)
if break_id == bpid:
# Make sure we've hit our breakpoint.
# From the docs of GetStopReasonDataAtIndex: "Breakpoint stop reasons
# will have data that consists of pairs of breakpoint IDs followed by
# the breakpoint location IDs".
# Iterate over all such pairs looking for `bpid`.
break_ids = [
thread.GetStopReasonDataAtIndex(idx)
for idx in range(0, thread.GetStopReasonDataCount(), 2)
]
if bpid in break_ids:
threads.append(thread)

return threads
Expand Down