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] Fix invoking "[kill|detach] inferiors" on inferiors that are not running


On Thu, Jul 30, 2015 at 11:29 AM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> Invoking either of the above commands on an inferior that's not running
> triggers the following assert failure:
>
>   .../binutils-gdb/gdb/thread.c:514: internal-error: any_thread_of_process: Assertion `pid != 0' failed.
>
> The fix is straightforward.  This patch adds a test to check the basic
> functionality of these commands, along with testing this fix in
> particular.  Tested on x86_64 Linux.
>
> gdb/ChangeLog:
>
>         * inferior.c (detach_inferior_command): Don't call
>         any_thread_of_process when pid is 0.
>         (kill_inferior_command): Likewise.
>
> gdb/testsuite/ChangeLog:
>
>         * gdb.base/kill-detach-inferiors-cmd.exp: New test file.
>         * gdb.base/kill-detach-inferiors-cmd.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]