From 1310c1b066d4a7b0ce48ad55103a8d559a37ace1 Mon Sep 17 00:00:00 2001 From: Pedro Franco de Carvalho Date: Mon, 30 Mar 2020 12:04:25 -0300 Subject: Add low_new_clone method to linux_nat_target. This patch adds a low_new_clone method to linux_nat_target, called after a PTRACE_EVENT_CLONE is detected, similar to how low_new_fork is called after PTRACE_EVENT_(V)FORK. This is useful for targets that need to copy state associated with a thread that is inherited across clones. gdb/ChangeLog: 2020-03-30 Pedro Franco de Carvalho * linux-nat.h (low_new_clone): New method. * linux-nat.c (linux_handle_extended_wait): Call low_new_clone. --- gdb/linux-nat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/linux-nat.h') diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index e224f89..1af9e83 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -164,6 +164,10 @@ public: virtual void low_new_fork (struct lwp_info *parent, pid_t child_pid) {} + /* The method to call, if any, when a new clone event is detected. */ + virtual void low_new_clone (struct lwp_info *parent, pid_t child_lwp) + {} + /* The method to call, if any, when a process is no longer attached. */ virtual void low_forget_process (pid_t pid) -- cgit v1.1