This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Unset attach_flag when running a new process
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: Patrick Palka <patrick at parcs dot ath dot cx>
- Date: Thu, 13 Aug 2015 11:11:43 -0400
- Subject: Re: [PATCH] Unset attach_flag when running a new process
- Authentication-results: sourceware.org; auth=none
- References: <1438219483-13498-1-git-send-email-patrick at parcs dot ath dot cx> <1438270110-23564-1-git-send-email-patrick at parcs dot ath dot cx>
On Thu, Jul 30, 2015 at 11:28 AM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> 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.
>
> [ I fixed the extended-gdbserver test failure by using
> prepare_for_testing instead of using build_executable + gdb_start. The
> former sets remote exec-file which is what makes the "run" command work as
> expected under extended-gdbserver. ]
>
> gdb/ChangeLog:
>
> * gdb/infcmd.c (run_comand_1): Unset attach_flag.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.base/run-after-attach.exp: New test file.
> * gdb.base/run-after-attach.c: New test file.
Ping.