public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: "Kévin Le Gouguec" <legouguec@adacore.com>,
	"Eli Zaretskii" <eliz@gnu.org>
Subject: [PATCH v2 0/6] Implement DAP cancellation
Date: Mon, 11 Dec 2023 09:02:17 -0700	[thread overview]
Message-ID: <20231211-dap-cancel-v2-0-db7b52cf0329@adacore.com> (raw)

DAP specifies a way to cancel requests.  Previously, I didn't
implement this, because it didn't seem necessary.  However, I realized
later that a 'repl' evaluation can cause the inferior to continue (or
gdb to invoke a long-running CLI or Python command), and a request
like this will not finish -- cancellation is necessary.

This series implements this feature.  I've split it into bite-sized
pieces.

Tested on x86-64 Fedora 38.

---
Changes in v2:
- Updated documentation per review
- Link to v1: https://inbox.sourceware.org/gdb-patches/20231201-dap-cancel-v1-0-872022fc328a@adacore.com

---
Tom Tromey (6):
      Clean up handling of DAP not-stopped response
      Move DAP JSON reader to its own thread
      Introduce gdb.interrupt
      Rename a couple of DAP procs in the testsuite
      Catch KeyboardInterrupt in send_gdb_with_response
      Implement DAP cancellation

 gdb/NEWS                          |   5 ++
 gdb/doc/gdb.texinfo               |  16 ++++++
 gdb/doc/python.texi               |  11 ++++
 gdb/python/lib/gdb/dap/server.py  | 115 ++++++++++++++++++++++++++++++++++++--
 gdb/python/lib/gdb/dap/startup.py |   4 +-
 gdb/python/python.c               |  19 +++++++
 gdb/testsuite/gdb.dap/pause.exp   |  71 +++++++++++++++++++++++
 gdb/testsuite/lib/dap-support.exp |  10 ++--
 8 files changed, 239 insertions(+), 12 deletions(-)
---
base-commit: 9a099bc220fbc97e9ccff6a7e1861e11665e8899
change-id: 20231201-dap-cancel-2c292d80ba37

Best regards,
-- 
Tom Tromey <tromey@adacore.com>


             reply	other threads:[~2023-12-11 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 16:02 Tom Tromey [this message]
2023-12-11 16:02 ` [PATCH v2 1/6] Clean up handling of DAP not-stopped response Tom Tromey
2023-12-11 16:02 ` [PATCH v2 2/6] Move DAP JSON reader to its own thread Tom Tromey
2023-12-11 16:02 ` [PATCH v2 3/6] Introduce gdb.interrupt Tom Tromey
2023-12-11 16:30   ` Eli Zaretskii
2023-12-11 16:02 ` [PATCH v2 4/6] Rename a couple of DAP procs in the testsuite Tom Tromey
2023-12-11 16:02 ` [PATCH v2 5/6] Catch KeyboardInterrupt in send_gdb_with_response Tom Tromey
2023-12-11 17:53   ` Kévin Le Gouguec
2023-12-11 16:02 ` [PATCH v2 6/6] Implement DAP cancellation Tom Tromey
2023-12-11 18:53 ` [PATCH v2 0/6] " Tom Tromey

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=20231211-dap-cancel-v2-0-db7b52cf0329@adacore.com \
    --to=tromey@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=legouguec@adacore.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).