This is the mail archive of the gdb-testers@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]

[binutils-gdb] Set proc->priv->new_inferior out of linux_add_process


*** TEST RESULTS FOR COMMIT 5ae3ebbae55482a9fdd01bd21455b396e23e4077 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 5ae3ebbae55482a9fdd01bd21455b396e23e4077

Set proc->priv->new_inferior out of linux_add_process
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.

gdb/gdbserver:

2015-07-24  Yao Qi  <yao.qi@linaro.org>

	* linux-low.c (linux_add_process): Don't set
	proc->priv->new_inferior.
	(linux_create_inferior): Set proc->priv->new_inferior to 1.
	(linux_attach): Likewise.


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