File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
lldb/packages/Python/lldbsuite/test Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -784,9 +784,16 @@ def get_threads_stopped_at_breakpoint_id(process, bpid):
784784 return threads
785785
786786 for thread in stopped_threads :
787- # Make sure we've hit our breakpoint...
788- break_id = thread .GetStopReasonDataAtIndex (0 )
789- if break_id == bpid :
787+ # Make sure we've hit our breakpoint.
788+ # From the docs of GetStopReasonDataAtIndex: "Breakpoint stop reasons
789+ # will have data that consists of pairs of breakpoint IDs followed by
790+ # the breakpoint location IDs".
791+ # Iterate over all such pairs looking for `bpid`.
792+ break_ids = [
793+ thread .GetStopReasonDataAtIndex (idx )
794+ for idx in range (0 , thread .GetStopReasonDataCount (), 2 )
795+ ]
796+ if bpid in break_ids :
790797 threads .append (thread )
791798
792799 return threads
You can’t perform that action at this time.
0 commit comments