From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH v6 0/4] [gdb/tui] Fix crash with debuginfod query
Date: Fri, 17 Apr 2026 09:57:15 +0200 [thread overview]
Message-ID: <20260417075719.852558-1-tdevries@suse.de> (raw)
This patch series fixes two PRs, PR31449 and PR33794.
An initial patch for PR31449 was submitted here [1]. A review comment
reported a problem when using C-x C-a to enable TUI instead of "tui enable",
not fixed by the patch. This was filed as PR33794.
The initial patch fixes PR31449 by calling a function that will force the
debuginfod query to happen before enabling the TUI.
Changes in v1 [2]:
- change approach:
- add a layout with only the command window, and activate that layout first,
making sure that we finalize the initialization of the command window
before we activate the initial layout
Changes in v2 [3]:
- change approach:
- add a facility defer_tui_rerender that allows deferral of calling the
rerender methods (which draws everything but the window borders), and
- use that facility to postpone rerendering in tui_enable until after io has
been initialized.
Changes in v3 [4]:
- change approach:
- add a check at the start of tui_inject_newline_into_command_window that
avoids the SIGFPE.
Changes in v4 [5]:
- change approach:
- bail out if debuginfod enabled is set to ask when entering TUI. This is
very similar to [1]. Unlike the previous approaches, this does fix
PR33794 as well.
Changes in v5 [6]:
- fixed some trivial errors in the v4.
- split the v4 patch up into three patches,
- added a patch introducing defaulted_query_auto_answers_p,
- used defaulted_query_auto_answers_p to make the fix less intrusive
Changes in v6:
- committed first patch of v5, a refactor patch
- change approach:
- revert to v3 approach for PR31449. The error thrown in tui_enable also
affected "gdb -tui", and for that scenario could only be avoided with
"set debuginfod enabled on/off" in .gdbearlyinit.
- describe entire version history in series description, instead of partly in
the series description and partly in one of the patches
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31449
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33794
[1] https://sourceware.org/pipermail/gdb-patches/2024-March/207224.html
[2] v1 https://sourceware.org/pipermail/gdb-patches/2026-January/224038.html
[3] v2 https://sourceware.org/pipermail/gdb-patches/2026-January/224103.html
[4] v3 https://sourceware.org/pipermail/gdb-patches/2026-February/225210.html
[5] v4 https://sourceware.org/pipermail/gdb-patches/2026-February/225351.html
[6] v5 https://sourceware.org/pipermail/gdb-patches/2026-March/226009.html
Tom de Vries (4):
[gdb/tui] Fix crash with debuginfod query (tui enable)
[gdb] Add debuginfod_enabled_ask_p
[gdb] Add defaulted_query_auto_answers_p
[gdb/tui] Fix crash with debuginfod query (C-x C-a)
gdb/debuginfod-support.c | 40 ++++++++++---
gdb/debuginfod-support.h | 5 ++
gdb/testsuite/gdb.tui/query-foo.c | 24 ++++++++
gdb/testsuite/gdb.tui/query.exp | 98 +++++++++++++++++++++++++++++++
gdb/tui/tui-io.c | 3 +
gdb/tui/tui.c | 10 +++-
gdb/tui/tui.h | 2 +-
gdb/utils.c | 55 +++++++++++++++--
gdb/utils.h | 4 ++
9 files changed, 224 insertions(+), 17 deletions(-)
create mode 100644 gdb/testsuite/gdb.tui/query-foo.c
create mode 100644 gdb/testsuite/gdb.tui/query.exp
base-commit: 19bcbe810d8c49eb05324624c0af72091d38c4a7
--
2.51.0
next reply other threads:[~2026-04-17 7:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 7:57 Tom de Vries [this message]
2026-04-17 7:57 ` [PATCH v6 1/4] [gdb/tui] Fix crash with debuginfod query (tui enable) Tom de Vries
2026-04-17 7:57 ` [PATCH v6 2/4] [gdb] Add debuginfod_enabled_ask_p Tom de Vries
2026-04-17 7:57 ` [PATCH v6 3/4] [gdb] Add defaulted_query_auto_answers_p Tom de Vries
2026-04-17 7:57 ` [PATCH v6 4/4] [gdb/tui] Fix crash with debuginfod query (C-x C-a) Tom de Vries
2026-04-25 14:40 ` [PATCH v6 0/4] [gdb/tui] Fix crash with debuginfod query Andrew Burgess
2026-05-01 14:26 ` Andrew Burgess
2026-05-01 16:34 ` 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=20260417075719.852558-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.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