summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbutil.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbutil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index 339619dc4f7..a5d5f7356b1 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -566,6 +566,15 @@ def get_threads_stopped_at_breakpoint (process, bkpt):
return threads
+def get_one_thread_stopped_at_breakpoint(process, bkpt, require_exactly_one = True):
+ threads = get_threads_stopped_at_breakpoint(process, bkpt)
+ if len(threads) == 0:
+ return None
+ if require_exactly_one and len(threads) != 1:
+ return None
+
+ return threads[0]
+
def is_thread_crashed (test, thread):
"""In the test suite we dereference a null pointer to simulate a crash. The way this is
reported depends on the platform."""
OpenPOWER on IntegriCloud