This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/8] Set proc->priv->new_inferior out of linux_add_process
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 24 Jul 2015 00:26:33 +0100
- Subject: Re: [PATCH 6/8] Set proc->priv->new_inferior out of linux_add_process
- Authentication-results: sourceware.org; auth=none
- References: <1437392126-29503-1-git-send-email-yao dot qi at linaro dot org> <1437392126-29503-7-git-send-email-yao dot qi at linaro dot org>
On 07/20/2015 12:35 PM, Yao Qi wrote:
> Nowadays, we set proc->priv->new_inferior to 1 inside linux_add_process,
> and new_inferior is used as a flag to initialise target description later.
> linux_add_process is used for the three cases, fork/vfork event
> (handle_extended_wait), run the program (linux_create_inferior), and
> attach to the process (linux_attach). In the first case, the child's
> target description is copied from parent's, so we don't need to initialise
> target description again later, which means we don't need to set
> proc->priv->new_inferior to 1 in this case. For the rest of two cases,
> we need this flag.
>
> This patch move the code setting proc->priv->new_inferior to 1 inside
> linux_add_process to linux_create_inferior and linux_attach. No
> functionality is changed.
LGTM.
Thanks,
Pedro Alves