Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v6 0/4] [gdb/tui] Fix crash with debuginfod query
@ 2026-04-17  7:57 Tom de Vries
  2026-04-17  7:57 ` [PATCH v6 1/4] [gdb/tui] Fix crash with debuginfod query (tui enable) Tom de Vries
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Tom de Vries @ 2026-04-17  7:57 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-01 16:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17  7:57 [PATCH v6 0/4] [gdb/tui] Fix crash with debuginfod query Tom de Vries
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox