diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 00ac68ae32..da78e061e9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-02-23 Simon Marchi + + * linux-nat.c (linux_nat_filter_event): Return void. + 2021-02-22 Tom Tromey * solib-svr4.c (enable_break): Update. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 42dcd77ac4..ccfd3c1320 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -2822,9 +2822,10 @@ resumed_callback (struct lwp_info *lp) } /* 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; @@ -2862,7 +2863,7 @@ linux_nat_filter_event (int lwpid, int status) 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 @@ -2870,7 +2871,7 @@ linux_nat_filter_event (int lwpid, int status) 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.) */ @@ -2894,7 +2895,7 @@ linux_nat_filter_event (int lwpid, int status) on. */ status = W_STOPCODE (SIGTRAP); if (linux_handle_syscall_trap (lp, 0)) - return NULL; + return; } else { @@ -2910,7 +2911,7 @@ linux_nat_filter_event (int lwpid, int status) 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. */ @@ -2926,7 +2927,7 @@ linux_nat_filter_event (int lwpid, int status) 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 @@ -2942,7 +2943,7 @@ linux_nat_filter_event (int lwpid, int status) /* 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 @@ -2968,7 +2969,7 @@ linux_nat_filter_event (int lwpid, int status) linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0); gdb_assert (lp->resumed); - return NULL; + return; } } @@ -2990,7 +2991,7 @@ linux_nat_filter_event (int lwpid, int status) gdb_assert (lp->resumed); /* Discard the event. */ - return NULL; + return; } /* Don't report signals that GDB isn't interested in, such as @@ -3039,7 +3040,7 @@ linux_nat_filter_event (int lwpid, int status) target_pid_to_str (lp->ptid).c_str (), (signo != GDB_SIGNAL_0 ? strsignal (gdb_signal_to_host (signo)) : "0")); - return NULL; + return; } } @@ -3047,7 +3048,6 @@ linux_nat_filter_event (int lwpid, int status) gdb_assert (lp); lp->status = status; save_stop_reason (lp); - return lp; } /* Detect zombie thread group leaders, and "exit" them. We can't reap