aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-02-22 11:22:14 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2022-02-22 11:22:14 -0800
commit85e8c48c73a5c39a6980f9b2bd16ec96062fc4c3 (patch)
treee7e787cb532f6eaa6594ef1711ce7bcb0ec9c0d2 /gdb
parent14b3360508b185087b9376487cfc49152af023d8 (diff)
downloadgdb-85e8c48c73a5c39a6980f9b2bd16ec96062fc4c3.zip
gdb-85e8c48c73a5c39a6980f9b2bd16ec96062fc4c3.tar.gz
gdb-85e8c48c73a5c39a6980f9b2bd16ec96062fc4c3.tar.bz2
inf-ptrace: Return an IGNORE event if waitpid() fails.
Previously this returned a TARGET_WAITKIND_SIGNALLED event for inferior_ptid. However, inferior_ptid is invalid during ::wait() methods after the multi-target changes, so this was triggering an assertion further up the stack.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/inf-ptrace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 6e4706a..0b94aad 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -313,9 +313,8 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
_("Child process unexpectedly missing: %s.\n"),
safe_strerror (save_errno));
- /* Claim it exited with unknown signal. */
- ourstatus->set_signalled (GDB_SIGNAL_UNKNOWN);
- return inferior_ptid;
+ ourstatus->set_ignore ();
+ return minus_one_ptid;
}
/* Ignore terminated detached child processes. */