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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index 021ae2db8f4..45e9bb407d1 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -750,14 +750,15 @@ def print_stacktraces(process, string_buffer = False):
if string_buffer:
return output.getvalue()
-def expect_state_changes(test, listener, states, timeout = 5):
+def expect_state_changes(test, listener, process, states, timeout = 5):
"""Listens for state changed events on the listener and makes sure they match what we
expect. Stop-and-restart events (where GetRestartedFromEvent() returns true) are ignored."""
for expected_state in states:
def get_next_event():
event = lldb.SBEvent()
- if not listener.WaitForEvent(timeout, event):
+ if not listener.WaitForEventForBroadcasterWithType(timeout, process.GetBroadcaster(),
+ lldb.SBProcess.eBroadcastBitStateChanged, event):
test.fail("Timed out while waiting for a transition to state %s" %
lldb.SBDebugger.StateAsCString(expected_state))
return event
OpenPOWER on IntegriCloud