public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: restore thread after detaching from an inferior
Date: Thu, 22 Oct 2020 16:35:56 +0100	[thread overview]
Message-ID: <2acab1ce-41be-b5ec-6893-53afeb9bd75e@palves.net> (raw)
In-Reply-To: <1602000337-24945-1-git-send-email-tankut.baris.aktemur@intel.com>

On 10/6/20 5:05 PM, Tankut Baris Aktemur via Gdb-patches wrote:
> The "detach inferiors N" command causes the current inferior to
> switch.  E.g.:
> 
>   $ gdb a.out
>   Reading symbols from a.out...
>   (gdb) start
>   ...
>   (gdb) add-inferior
>   [New inferior 2]
>   Added inferior 2 on connection 1 (native)
>   (gdb) inferior 2
>   [Switching to inferior 2 [<null>] (<noexec>)]
>   (gdb) info inferiors
>     Num  Description       Connection           Executable
>     1    process 18242     1 (native)           /path/to/a.out
>   * 2    <null>            1 (native)
>   (gdb) detach inferiors 1
>   Detaching from program: /path/to/a.out, process 18242
>   [Inferior 1 (process 18242) detached]
>   (gdb) info inferiors
>     Num  Description       Connection           Executable
>   * 1    <null>                                 /path/to/a.out
>     2    <null>            1 (native)
>   (gdb)

This is:

 https://sourceware.org/bugzilla/show_bug.cgi?id=19318

So I agree with your patch.  But what about "kill inferior" ?

  parent reply	other threads:[~2020-10-22 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 16:05 Tankut Baris Aktemur
2020-10-21  6:58 ` Aktemur, Tankut Baris
2020-10-22 15:35 ` Pedro Alves [this message]
2020-10-28 17:11   ` Aktemur, Tankut Baris
2020-10-28 17:12 ` [PATCH v2] gdb: restore thread after detaching or killing " Tankut Baris Aktemur
2020-10-29 14:26   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2acab1ce-41be-b5ec-6893-53afeb9bd75e@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=tankut.baris.aktemur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).