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: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] [gdb] Fix sig_write for null gdb_stderr
Date: Fri, 02 May 2025 12:45:00 -0600	[thread overview]
Message-ID: <871pt6zwb7.fsf@tromey.com> (raw)
In-Reply-To: <716d68d7-6888-4da6-a0e1-d8bf6c75f663@suse.de> (Tom de Vries's message of "Wed, 30 Apr 2025 21:11:28 +0200")

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

Tom>       tui_active = true;
Tom> ...

Tom> After that we call tui_set_initial_layout, and the DWARF error is thrown.

Tom> It's not caught early enough to continue executing tui_enable.

Tom> Consequently, tui_setup_io (1) is not called.

Tom> Then when undo_terminal_modifications_before_exit is called, it calls
Tom> tui_disable, which checks for tui_active, and then calls setup_io (0)
Tom> assuming setup_io (1) has been called, which is not the case.

It sounds like an invariant isn't being kept here, I wonder if there
should be code to reset tui_active if tui_set_initial_layout throws?

Tom

  reply	other threads:[~2025-05-02 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 17:18 [PATCH 0/2] [gdb] Fix error handling with nullptr gdb_stdout/gdb_stderr Tom de Vries
2025-04-25 17:18 ` [PATCH 1/2] [gdb] Fix sig_write for null gdb_stderr Tom de Vries
2025-04-28 15:17   ` Simon Marchi
2025-04-29 11:50     ` Tom de Vries
2025-04-29 15:34   ` Tom Tromey
2025-04-30 18:49     ` Tom de Vries
2025-04-30 19:11       ` Tom de Vries
2025-05-02 18:45         ` Tom Tromey [this message]
2025-04-25 17:18 ` [PATCH 2/2] [gdb] Handle nullptr stream in gdb_flush Tom de Vries
2025-04-28 15:21   ` Simon Marchi
2025-04-28 16:32     ` Tom de Vries
2025-04-28 16:38       ` Simon Marchi
2025-04-29 11:52         ` 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=871pt6zwb7.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