public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] [gdb/cli] Allow source highlighting to be interrupted
@ 2023-10-18 17:11 Tom de Vries
  2023-10-18 17:11 ` [PATCH v4 1/4] [gdb/cli] Add gnu-source-highlight selftest Tom de Vries
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tom de Vries @ 2023-10-18 17:11 UTC (permalink / raw)
  To: gdb-patches

I wrote this patch series to fix PR cli/30934.

The 1st patch adds a source highlighting self test.

The 2nd patch allows source highlighting to be interrupted when
running a list command, either using SIGINT or SIGTERM, or a run
command using SIGTERM.

The 3rd patch allows source highlighting to be interrupted when
running a run command, using SIGINT, fixing PR cli/30934.

The 4th patch changes the mode in which source highlighting is interrupted:
asking the user for confirmation that source highlighting should indeed be
interrupted, and if so only interrupting highlighting, and not the command.

Changes in v4:
- committed the first 3 patches of v3
- added handling of SIGTERM (after comment by Pedro)
- added self test
- broadened scope of quit_handler = default_quit_handler fix, and
  moved it into a patch of its own
- moved the question into a patch of its own

Changes in v3:
- dropped the "#if __cplusplus >= 202002L" in the first patch.
- added a reset of the highlighter's EventListener to prevent a dangling
  pointer.

Changes in v2:
- fixed a build problem with --disable-source-highlight, reported by the linaro
  CI.
- temporarily installs the default_quit_handler to be able to use QUIT
- added a question whether to interrupt highlighting or not
  (in the RFC, I had a warning, in v1 I dropped it)
- added "gdb_assert (target_terminal::is_ours ())"

Adding the question was inspired by the v3 patch "gdb/debuginfod: Ctrl-C ask
to cancel further downloads" (
https://sourceware.org/pipermail/gdb-patches/2023-March/197679.html ).

Submission history:
- RFC:
  https://sourceware.org/pipermail/gdb-patches/2023-October/203157.html
- v1:
  https://sourceware.org/pipermail/gdb-patches/2023-October/203179.html
- v2:
  https://sourceware.org/pipermail/gdb-patches/2023-October/203199.html
- v3:
  https://sourceware.org/pipermail/gdb-patches/2023-October/203270.html

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30934

Tom de Vries (4):
  [gdb/cli] Add gnu-source-highlight selftest
  [gdb/cli] Allow source highlighting to be interrupted
  [gdb/cli] Allow source highlighting to be interrupted (continued)
  [gdb/cli] Ask if source highlighting should be interrupted

 gdb/infrun.c       |  23 ++++--
 gdb/source-cache.c | 186 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 202 insertions(+), 7 deletions(-)


base-commit: 29736fc507c7a9c6e797b7f83e8df4be73d37767
-- 
2.35.3


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

end of thread, other threads:[~2023-10-24 12:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 17:11 [PATCH v4 0/4] [gdb/cli] Allow source highlighting to be interrupted Tom de Vries
2023-10-18 17:11 ` [PATCH v4 1/4] [gdb/cli] Add gnu-source-highlight selftest Tom de Vries
2023-10-18 17:11 ` [PATCH v4 2/4] [gdb/cli] Allow source highlighting to be interrupted Tom de Vries
2023-10-18 17:11 ` [PATCH v4 3/4] [gdb/cli] Allow source highlighting to be interrupted (continued) Tom de Vries
2023-10-20 19:16   ` Pedro Alves
2023-10-24 12:35     ` Tom de Vries
2023-10-18 17:11 ` [PATCH v4 4/4] [gdb/cli] Ask if source highlighting should be interrupted Tom de Vries
2023-10-20 19:17   ` Pedro Alves
2023-10-24 12:47     ` 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).