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.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index a5d5f7356b1..679fdbae75d 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -548,7 +548,7 @@ def get_stopped_thread(process, reason):
return None
return threads[0]
-def get_threads_stopped_at_breakpoint (process, bkpt):
+def get_threads_stopped_at_breakpoint_id(process, bpid):
""" For a stopped process returns the thread stopped at the breakpoint passed in bkpt"""
stopped_threads = []
threads = []
@@ -561,13 +561,16 @@ def get_threads_stopped_at_breakpoint (process, bkpt):
for thread in stopped_threads:
# Make sure we've hit our breakpoint...
break_id = thread.GetStopReasonDataAtIndex (0)
- if break_id == bkpt.GetID():
+ if break_id == bpid:
threads.append(thread)
return threads
-def get_one_thread_stopped_at_breakpoint(process, bkpt, require_exactly_one = True):
- threads = get_threads_stopped_at_breakpoint(process, bkpt)
+def get_threads_stopped_at_breakpoint (process, bkpt):
+ return get_threads_stopped_at_breakpoint_id(process, bkpt.GetID())
+
+def get_one_thread_stopped_at_breakpoint_id(process, bpid, require_exactly_one = True):
+ threads = get_threads_stopped_at_breakpoint_id(process, bpid)
if len(threads) == 0:
return None
if require_exactly_one and len(threads) != 1:
@@ -575,6 +578,9 @@ def get_one_thread_stopped_at_breakpoint(process, bkpt, require_exactly_one = Tr
return threads[0]
+def get_one_thread_stopped_at_breakpoint(process, bkpt, require_exactly_one = True):
+ return get_one_thread_stopped_at_breakpoint_id(bkpt.GetID(), require_exactly_one)
+
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