if (resume_all)
iterate_over_lwps (resume_callback, NULL);
- linux_ops->to_resume (ptid, step, signo);
-
if (target_can_async_p ())
{
+ /* Check for pending events. If we find any, then we won't really
+ resume, but rather we will extract the first event from the pending events
+ queue, and post it to the gdb event queue, and then "pretend" that we have
+ in fact resumed. */
+
status.kind = TARGET_WAITKIND_SPURIOUS;
gdb_process_events (gdb_status, &status, 0, 0);
target_executing = 1;
return;
}
+ }
+
+ linux_ops->to_resume (ptid, step, signo);
+ if (target_can_async_p ())
target_async (inferior_event_handler, 0);
- }
if (target_is_async_p ())
target_executing = 1;
if ((ourstatus->kind == TARGET_WAITKIND_EXITED)
|| (ourstatus->kind == TARGET_WAITKIND_SIGNALLED))
- return null_ptid;
+ {
+ return null_ptid;
+ }
return BUILD_LWP (gdb_status->pid, gdb_status->pid);
}