}
/* Check if we should go on and pass this event to common code.
- Return the affected lwp if we should, or NULL otherwise. */
-static struct lwp_info *
+ If so, save the status to the lwp_info structure associated to LWPID. */
+
+static void
linux_nat_filter_event (int lwpid, int status)
{
struct lwp_info *lp;
linux_nat_debug_printf ("saving LWP %ld status %s in stopped_pids list",
(long) lwpid, status_to_str (status));
add_to_pid_list (&stopped_pids, lwpid, status);
- return NULL;
+ return;
}
/* Make sure we don't report an event for the exit of an LWP not in
if we detach from a program we originally forked and then it
exits. */
if (!WIFSTOPPED (status) && !lp)
- return NULL;
+ return;
/* This LWP is stopped now. (And if dead, this prevents it from
ever being continued.) */
on. */
status = W_STOPCODE (SIGTRAP);
if (linux_handle_syscall_trap (lp, 0))
- return NULL;
+ return;
}
else
{
linux_nat_debug_printf ("Handling extended status 0x%06x", status);
if (linux_handle_extended_wait (lp, status))
- return NULL;
+ return;
}
/* Check if the thread has exited. */
was not the end of the debugged application and should be
ignored. */
exit_lwp (lp);
- return NULL;
+ return;
}
/* Note that even if the leader was ptrace-stopped, it can still
/* Store the pending event in the waitstatus, because
W_EXITCODE(0,0) == 0. */
store_waitstatus (&lp->waitstatus, status);
- return lp;
+ return;
}
/* Make sure we don't report a SIGSTOP that we sent ourselves in
linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
gdb_assert (lp->resumed);
- return NULL;
+ return;
}
}
gdb_assert (lp->resumed);
/* Discard the event. */
- return NULL;
+ return;
}
/* Don't report signals that GDB isn't interested in, such as
target_pid_to_str (lp->ptid).c_str (),
(signo != GDB_SIGNAL_0
? strsignal (gdb_signal_to_host (signo)) : "0"));
- return NULL;
+ return;
}
}
gdb_assert (lp);
lp->status = status;
save_stop_reason (lp);
- return lp;
}
/* Detect zombie thread group leaders, and "exit" them. We can't reap