Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/tui] Handle error in tui_enable
Date: Tue, 28 Apr 2026 08:10:13 -0600	[thread overview]
Message-ID: <874ikvnpkq.fsf@tromey.com> (raw)
In-Reply-To: <20260424154942.50673-1-tdevries@suse.de> (Tom de Vries's message of "Fri, 24 Apr 2026 17:49:42 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Say we simulate an error:
Tom> ...

Is there a way that this can happen without simulation?

I'm asking because:

Tom> Note that this doesn't allow a second attempt:
Tom> ...
Tom> $ gdb -q
Tom> (gdb) tui enable
Tom> ❌️ Oh no!!!
Tom> (gdb) tui enable
Tom> ❌️ Cannot enable the TUI
Tom> (gdb)
Tom> ...
Tom> because tui_finish_init is stuck at TRIBOOL_UNKNOWN.

Tom> IWBN to fix this in a way that allows the second "tui enable" to succeed.  I
Tom> tried this for a bit, but didn't get it to work.

If this can occur due to some user problem (say a bad layout or bad
window implementation) then gdb ideally should be more robust somehow.

But OTOH if this is something that's really obscure, what you have seems
totally fine.

Anyway I think the patch itself is ok.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

  reply	other threads:[~2026-04-28 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 15:49 Tom de Vries
2026-04-28 14:10 ` Tom Tromey [this message]
2026-04-28 21:42   ` Tom de Vries
2026-04-29 11:14     ` Tom de Vries

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=874ikvnpkq.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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