Reset inferior::control on inferior exit

When we kill an inferior, the inferior is not deleted.  What is more, it
is reused when the new process is created, so we need to reset inferior's
state when it exits.

gdb:

2018-02-15  Yao Qi  <yao.qi@linaro.org>

	PR gdb/22849
	* inferior.c (exit_inferior_1): Reset inf->control.
This commit is contained in:
Yao Qi 2018-02-15 14:48:30 +00:00
parent 355c559b74
commit 85046ae23f
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2018-02-15 Yao Qi <yao.qi@linaro.org>
PR gdb/22849
* inferior.c (exit_inferior_1): Reset inf->control.
2018-02-15 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (ada_to_fixed_value_create): Delete advance

View File

@ -224,6 +224,8 @@ exit_inferior_1 (struct inferior *inftoex, int silent)
}
inf->pending_detach = 0;
/* Reset it. */
inf->control = {NO_STOP_QUIETLY};
}
void