Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aaron Merey via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Aaron Merey via Gdb-patches <gdb-patches@sourceware.org>,
	Tom de Vries <vries@gcc.gnu.org>
Subject: Re: [PATCH] [PR gdb/27026] CTRL-C is ignored when debug info is downloaded
Date: Tue, 14 Dec 2021 17:32:24 -0500	[thread overview]
Message-ID: <CAJDtP-QnMxjmdqn8APaGGOTO6GPyE56npWuF6kbvhG4z1B_hqg@mail.gmail.com> (raw)
In-Reply-To: <87lf1470k1.fsf@tromey.com>

Hi Tom,

On Wed, Dec 1, 2021 at 11:45 AM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Aaron" == Aaron Merey via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Aaron> +  gdb::optional<target_terminal::scoped_restore_terminal_state> term_state;
> Aaron> +  if (target_supports_terminal_ours ())
> Aaron> +    {
> Aaron> +      term_state.emplace ();
> Aaron> +      target_terminal::ours ();
> Aaron> +    }
>
> I was curious to know if the gdb::optional and the
> target_supports_terminal_ours checks are really needed here.
> I think plenty of spots do this stuff unconditionally, so I
> was wondering if this code has some special need.

These checks came from Tom's draft of this patch. AFAICT it's done
out of an abundance of caution in case this code runs before any
inferior is loaded. I'm not sure that is currently possible but I think
it's better to be safe than sorry here.

Aaron


      reply	other threads:[~2021-12-14 22:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  1:43 Aaron Merey via Gdb-patches
2021-11-24  7:34 ` Tom de Vries via Gdb-patches
2021-11-24 20:55   ` Aaron Merey via Gdb-patches
2021-11-29 19:23 ` Kevin Buettner via Gdb-patches
2021-11-29 20:07   ` Aaron Merey via Gdb-patches
2021-12-01 16:27 ` Tom Tromey
2021-12-14 22:32   ` Aaron Merey via Gdb-patches [this message]

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=CAJDtP-QnMxjmdqn8APaGGOTO6GPyE56npWuF6kbvhG4z1B_hqg@mail.gmail.com \
    --to=gdb-patches@sourceware.org \
    --cc=amerey@redhat.com \
    --cc=tom@tromey.com \
    --cc=vries@gcc.gnu.org \
    /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