Lines Matching full:event
2 Test lldb Python event APIs.
64 # Create an empty event object.
65 event = lldb.SBEvent()
71 # Create MyListeningThread class to wait for any kind of event.
77 # Let's only try at most 4 times to retrieve any kind of event.
81 print("Try wait for event...")
82 if listener.WaitForEvent(5, event):
84 desc = lldbutil.get_description(event)
85 print("Event description:", desc)
86 print("Event data flavor:", event.GetDataFlavor())
94 print("timeout occurred waiting for event...")
108 # able to receive the state changed event, too.
157 # Create an empty event object.
158 event = lldb.SBEvent()
159 self.assertFalse(event, "Event should not be valid initially")
161 # Create MyListeningThread to wait for any kind of event.
167 # Let's only try at most 3 times to retrieve any kind of event.
169 if listener.WaitForEvent(5, event):
170 self.context.trace("Got a valid event:", event)
171 self.context.trace("Event data flavor:", event.GetDataFlavor())
173 "Event type:", lldbutil.state_type_to_str(event.GetType())
183 # able to receive a state changed event.
186 # Let's start the listening thread to retrieve the event.
194 self.assertTrue(event, "My listening thread successfully received an event")
237 # Create an empty event object.
238 event = lldb.SBEvent()
239 self.assertFalse(event, "Event should not be valid initially")
242 # initial state of None, which means no event has been received.
243 # It changes to 'connected' after 'connected' event is received (for remote platforms)
244 # It changes to 'running' after 'running' event is received (should happen only if the
246 # It changes to 'stopped' if a 'stopped' event is received (should happen only if the
251 # By design, a "running" event is expected following by a "stopped"
252 # event.
259 # Regular expression pattern for the event description.
265 if listener.WaitForEvent(5, event):
266 desc = lldbutil.get_description(event)
267 self.context.trace("Event description:", desc)
273 # first get the 'connected' event.
319 """Wait for an event from self.primary & self.shadow listener.
325 event = lldb.SBEvent()
328 success = self.shadow_listener.WaitForEvent(1, event)
331 # But there should be an event for the primary listener:
332 success = self.primary_listener.WaitForEvent(5, event)
334 self.assertTrue(success, "Primary listener got the event")
336 state = lldb.SBProcess.GetStateFromEvent(event)
337 primary_event_type = event.GetType()
340 restart = lldb.SBProcess.GetRestartedFromEvent(event)
353 state, expected_state, "Primary thread got the correct event"
356 # And after pulling that one there should be an equivalent event for the shadow
358 success = self.shadow_listener.WaitForEvent(5, event)
359 self.assertTrue(success, "Shadow listener got event too")
360 shadow_event_type = event.GetType()
362 primary_event_type, shadow_event_type, "It was the same event type"
365 state, lldb.SBProcess.GetStateFromEvent(event), "It was the same state"
369 lldb.SBProcess.GetRestartedFromEvent(event),
426 # expect any particular event till we get the stopped: