aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-02-23 13:51:58 -0700
committerTom Tromey <tromey@adacore.com>2024-02-27 10:30:30 -0700
commitb452b96c1e57db42d50a42eb2f09f7c57681d073 (patch)
tree29e1c3b609331913a4afe12df46dcbafd26cc8f6 /gdb/python
parent6313c05640cf6e2f6b1b1b8e66789b34b45f19c7 (diff)
downloadgdb-b452b96c1e57db42d50a42eb2f09f7c57681d073.zip
gdb-b452b96c1e57db42d50a42eb2f09f7c57681d073.tar.gz
gdb-b452b96c1e57db42d50a42eb2f09f7c57681d073.tar.bz2
Explicitly quit gdb from DAP server thread
This changes the DAP code to explicitly request that gdb exit. Previously this could cause crashes, but with the previous cleanups, this should no longer happen. This also adds a tests that ensures that gdb exits with status 0.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/lib/gdb/dap/server.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/python/lib/gdb/dap/server.py b/gdb/python/lib/gdb/dap/server.py
index 6757f29..19840f4 100644
--- a/gdb/python/lib/gdb/dap/server.py
+++ b/gdb/python/lib/gdb/dap/server.py
@@ -230,6 +230,7 @@ class Server:
# responses are flushed to the client before exiting.
self.write_queue.put(None)
json_writer.join()
+ send_gdb("quit")
@in_dap_thread
def send_event_later(self, event, body=None):