From: Yao Qi Date: Thu, 15 Feb 2018 14:48:30 +0000 (+0000) Subject: Reset inferior::control on inferior exit X-Git-Tag: users/ARM/embedded-gdb-8.1-branch-2018q2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8;p=thirdparty%2Fbinutils-gdb.git 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 PR gdb/22849 * inferior.c (exit_inferior_1): Reset inf->control. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9524aa2fa00..18aaf888295 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-02-15 Yao Qi + + PR gdb/22849 + * inferior.c (exit_inferior_1): Reset inf->control. + 2018-02-09 Joel Brobecker PR gdb/22824: diff --git a/gdb/inferior.c b/gdb/inferior.c index 0b8f340b63a..70856ae2b1f 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