This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Unset attach_flag when running a new process


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]