aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2022-10-14 20:17:36 +0100
committerPedro Alves <pedro@palves.net>2022-11-07 15:21:34 +0000
commitb7096df235486ce718c2a0bfda8a0db074dcb671 (patch)
tree25b87dd6cecac543f49293089933448592b7cc41 /gdb/linux-nat.c
parent23912acd402f5af9caf91b257e5209ec4c58a09c (diff)
downloadgdb-b7096df235486ce718c2a0bfda8a0db074dcb671.zip
gdb-b7096df235486ce718c2a0bfda8a0db074dcb671.tar.gz
gdb-b7096df235486ce718c2a0bfda8a0db074dcb671.tar.bz2
Don't explicitly set clone child ptrace options
linux_handle_extended_wait calls target_post_attach if we're handling a PTRACE_EVENT_CLONE, and libthread_db.so isn't active. target_post_attach just calls linux_init_ptrace_procfs to set the lwp's ptrace options. However, this is completely unnecessary, because, as man ptrace [1] says, options are inherited: "Flags are inherited by new tracees created and "auto-attached" via active PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, or PTRACE_O_TRACECLONE options." This removes the unnecessary call. [1] - https://man7.org/linux/man-pages/man2/ptrace.2.html Approved-By: Simon Marchi <simon.marchi@efficios.com> Change-Id: I533eaa60b700f7e40760311fc0d344d0b3f19a78
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index f4f7aa8..0b3c143 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -1912,7 +1912,6 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
{
/* The process is not using thread_db. Add the LWP to
GDB's list. */
- target_post_attach (new_lp->ptid.lwp ());
add_thread (linux_target, new_lp->ptid);
}