void
push_event (ptid_t ptid, struct target_waitstatus *status)
{
+ gdb_assert (status->kind != TARGET_WAITKIND_IGNORE);
+
queue_stop_reply (ptid, status);
/* If this is the first stop reply in the queue, then inform GDB
mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
if (last_status.kind != TARGET_WAITKIND_STOPPED)
return signal_pid;
+
+ current_inferior->last_resume_kind = resume_stop;
+ current_inferior->last_status = last_status;
}
while (last_status.value.sig != TARGET_SIGNAL_TRAP);
+ current_inferior->last_resume_kind = resume_stop;
+ current_inferior->last_status = last_status;
return signal_pid;
}
(assuming success). */
last_ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
+ if (last_status.kind != TARGET_WAITKIND_EXITED
+ && last_status.kind != TARGET_WAITKIND_SIGNALLED)
+ {
+ current_inferior->last_resume_kind = resume_stop;
+ current_inferior->last_status = last_status;
+ }
+
return signal_pid;
}
if (last_status.kind == TARGET_WAITKIND_STOPPED
&& last_status.value.sig == TARGET_SIGNAL_STOP)
last_status.value.sig = TARGET_SIGNAL_TRAP;
+
+ current_inferior->last_resume_kind = resume_stop;
+ current_inferior->last_status = last_status;
}
return 0;
{
last_ptid = mywait (minus_one_ptid, &last_status, 0, 1);
+ if (last_status.kind != TARGET_WAITKIND_EXITED
+ && last_status.kind != TARGET_WAITKIND_SIGNALLED)
+ current_inferior->last_status = last_status;
+
/* From the client's perspective, all-stop mode always stops all
threads implicitly (and the target backend has already done
so by now). Tag all threads as "want-stopped", so we don't
else
{
last_ptid = mywait (minus_one_ptid, &last_status, 0, 1);
+
+ if (last_status.kind != TARGET_WAITKIND_EXITED
+ && last_status.kind != TARGET_WAITKIND_SIGNALLED)
+ {
+ current_inferior->last_resume_kind = resume_stop;
+ current_inferior->last_status = last_status;
+ }
+
prepare_resume_reply (own_buf, last_ptid, &last_status);
disable_async_io ();
target_pid_to_str (entry->id),
target_waitstatus_to_string (&thread->last_status));
+ gdb_assert (thread->last_status.kind != TARGET_WAITKIND_IGNORE);
+
/* Pass the last stop reply back to GDB, but don't notify
yet. */
queue_stop_reply (entry->id, &thread->last_status);
mourn_inferior (process);
}
else
- /* We're reporting this thread as stopped. Update it's
- "want-stopped" state to what the client wants, until it gets
- a new resume action. */
- gdb_wants_thread_stopped (¤t_inferior->entry);
+ {
+ /* We're reporting this thread as stopped. Update its
+ "want-stopped" state to what the client wants, until it
+ gets a new resume action. */
+ current_inferior->last_resume_kind = resume_stop;
+ current_inferior->last_status = last_status;
+ }
if (forward_event)
{