Unset attach_flag when running a new process
authorPatrick Palka <patrick@parcs.ath.cx>
Thu, 30 Jul 2015 00:03:43 +0000 (20:03 -0400)
committerPatrick Palka <patrick@parcs.ath.cx>
Thu, 27 Aug 2015 00:50:43 +0000 (20:50 -0400)
commite9756d52bea3834ffb31d0a907944bd022250ed8
tree7d68daf8a6d0ca48037ce86fe59218d5d6afc619
parent60f02a58bf59d2cc355aa8ba56f8111477972d89
Unset attach_flag when running a new process

We currently set attach_flag when attaching to a process, so we should
make sure to unset it when forking a new process.  Otherwise attach_flag
would remain set after forking, if the previous process associated with
the inferior was attached to.

gdb/ChangeLog:

* target.c (target_pre_inferior): Unset attach_flag.

gdb/testsuite/ChangeLog:

* gdb.base/run-after-attach.exp: New test file.
* gdb.base/run-after-attach.c: New test file.
gdb/ChangeLog
gdb/target.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/run-after-attach.c [new file with mode: 0644]
gdb/testsuite/gdb.base/run-after-attach.exp [new file with mode: 0644]