diff options
author | Yao Qi <yao.qi@linaro.org> | 2018-02-15 14:48:30 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2018-02-15 14:50:03 +0000 |
commit | 2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8 (patch) | |
tree | 382dd4912c32d2511a9dbfc2cbb5f12ffbace699 | |
parent | 37cd518812789e0db2531c67544c25495a32469a (diff) | |
download | binutils-2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8.zip binutils-2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8.tar.gz binutils-2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/inferior.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9524aa2..18aaf88 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-09 Joel Brobecker <brobecker@adacore.com> PR gdb/22824: diff --git a/gdb/inferior.c b/gdb/inferior.c index 0b8f340..70856ae 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 |