]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Reset inferior::control on inferior exit
authorYao Qi <yao.qi@linaro.org>
Thu, 15 Feb 2018 14:48:30 +0000 (14:48 +0000)
committerYao Qi <yao.qi@linaro.org>
Thu, 15 Feb 2018 14:50:03 +0000 (14:50 +0000)
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.

gdb/ChangeLog
gdb/inferior.c

index 9524aa2fa00fab7d4ed020ba2e560d0ddcdb89b1..18aaf888295b3e88dddcc39da13ece6cbdfbd5d2 100644 (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-09  Joel Brobecker  <brobecker@adacore.com>
 
        PR gdb/22824:
index 0b8f340b63a1a1d021f37356c66133fd3d9767b4..70856ae2b1fc2ced2d4e42e5d4be64c8f3e65020 100644 (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