This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Reset inferior::control on inferior exit
- From: Yao Qi <qiyao at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 15 Feb 2018 14:49:30 -0000
- Subject: [binutils-gdb] Reset inferior::control on inferior exit
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=85046ae23f853bfd01db6b4a840e80220487bffd
commit 85046ae23f853bfd01db6b4a840e80220487bffd
Author: Yao Qi <yao.qi@linaro.org>
Date: Thu Feb 15 14:48:30 2018 +0000
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.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/inferior.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a36c44d..5c6f67a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 38b7369..880f25d 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -224,6 +224,8 @@ exit_inferior_1 (struct inferior *inftoex, int silent)
}
inf->pending_detach = 0;
+ /* Reset it. */
+ inf->control = {NO_STOP_QUIETLY};
}
void