This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/8] Set proc->priv->new_inferior out of linux_add_process


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]