This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Add low_new_clone method to linux_nat_target.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedromfc at linux dot ibm dot com (Pedro Franco de Carvalho)
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 8 Aug 2019 16:05:26 +0200 (CEST)
- Subject: Re: [PATCH 1/3] Add low_new_clone method to linux_nat_target.
Pedro Franco de Carvalho wrote:
> 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:
> YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * linux-nat.h (low_new_clone): New method.
> * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
Other targets seem to handle this in the linux_nat_target::low_new_thread
method, which is already called from linux_handle_extended_wait (via the
add_lwp routine) under those same conditions.
Why does this not work for Power?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com