[0/5] Restore DAP 'quit' request

Message ID 20240223-final-cleanups-v1-0-84d5271e9979@adacore.com
Headers
Series Restore DAP 'quit' request |

Message

Tom Tromey Feb. 23, 2024, 9:11 p.m. UTC
  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,