+2021-06-22 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * infrun.c (do_target_wait): Remove wait_ptid parameter.
+ (fetch_inferior_event): Adjust.
+
2021-06-22 Simon Marchi <simon.marchi@polymtl.ca>
* python/lib/gdb/__init__.py (_execute_unwinders): Return tuple
more events. Polls for events from all inferiors/targets. */
static bool
-do_target_wait (ptid_t wait_ptid, execution_control_state *ecs,
- target_wait_flags options)
+do_target_wait (execution_control_state *ecs, target_wait_flags options)
{
int num_inferiors = 0;
int random_selector;
polling the rest of the inferior list starting from that one in a
circular fashion until the whole list is polled once. */
- auto inferior_matches = [&wait_ptid] (inferior *inf)
+ auto inferior_matches = [] (inferior *inf)
{
- return (inf->process_target () != NULL
- && ptid_t (inf->pid).matches (wait_ptid));
+ return inf->process_target () != nullptr;
};
/* First see how many matching inferiors we have. */
auto do_wait = [&] (inferior *inf)
{
- ecs->ptid = do_target_wait_1 (inf, wait_ptid, &ecs->ws, options);
+ ecs->ptid = do_target_wait_1 (inf, minus_one_ptid, &ecs->ws, options);
ecs->target = inf->process_target ();
return (ecs->ws.kind != TARGET_WAITKIND_IGNORE);
};
the event. */
scoped_disable_commit_resumed disable_commit_resumed ("handling event");
- if (!do_target_wait (minus_one_ptid, ecs, TARGET_WNOHANG))
+ if (!do_target_wait (ecs, TARGET_WNOHANG))
{
infrun_debug_printf ("do_target_wait returned no event");
disable_commit_resumed.reset_and_commit ();