Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/5] Restore DAP 'quit' request
Date: Fri, 23 Feb 2024 14:11:36 -0700	[thread overview]
Message-ID: <20240223-final-cleanups-v1-0-84d5271e9979@adacore.com> (raw)

This series started as an attempt to make DAP cause gdb to exit after
a terminate request is handled.

However, as noted in earlier discussion, this can sometimes cause
crashes.

This series fixes the problem by rewriting final cleanups and then
explicitly shutting down Python after these have been run.  A new
final cleanup for runnables is added -- this is needed because the
request to quit may actually race with other reasons to quit (IIUC).

Regression tested on x86-64 Fedora 38.

---
Tom Tromey (5):
      Rewrite final cleanups
      Add extension_language_ops::shutdown
      Change finalize_values into a final cleanup
      Add final cleanup for runnables
      Explicitly quit gdb from DAP server thread

 gdb/compile/compile.c             |  30 ++++------
 gdb/debuginfod-support.c          |  14 ++---
 gdb/extension-priv.h              |   4 ++
 gdb/extension.c                   |  12 ++++
 gdb/extension.h                   |   3 +
 gdb/guile/guile.c                 |   1 +
 gdb/python/lib/gdb/dap/server.py  |   1 +
 gdb/python/python.c               |   6 +-
 gdb/run-on-main-thread.c          |  11 ++++
 gdb/testsuite/lib/dap-support.exp |   9 +++
 gdb/top.c                         |   8 +--
 gdb/value.c                       |  15 ++---
 gdb/value.h                       |   4 --
 gdbsupport/cleanups.cc            | 122 ++++----------------------------------
 gdbsupport/cleanups.h             |  17 ++----
 15 files changed, 85 insertions(+), 172 deletions(-)
---
base-commit: bf8ab2ae8d33e46bb6612408c75e75a6de137ccc
change-id: 20240223-final-cleanups-75c9e5640f5c

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


             reply	other threads:[~2024-02-23 21:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 21:11 Tom Tromey [this message]
2024-02-23 21:11 ` [PATCH 1/5] Rewrite final cleanups Tom Tromey
2024-02-25 22:30   ` Lancelot SIX
2024-02-26 18:53     ` Tom Tromey
2024-02-27 14:03       ` Lancelot SIX
2024-02-27 17:27         ` Tom Tromey
2024-02-27 17:36           ` Tom Tromey
2024-03-03 16:50           ` Lancelot SIX
2024-02-23 21:11 ` [PATCH 2/5] Add extension_language_ops::shutdown Tom Tromey
2024-02-23 21:11 ` [PATCH 3/5] Change finalize_values into a final cleanup Tom Tromey
2024-02-23 21:11 ` [PATCH 4/5] Add final cleanup for runnables Tom Tromey
2024-02-23 21:11 ` [PATCH 5/5] Explicitly quit gdb from DAP server thread 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=20240223-final-cleanups-v1-0-84d5271e9979@adacore.com \
    --to=tromey@adacore.com \
    --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