Implement DAP 'terminated' event
authorTom Tromey <tromey@adacore.com>
Tue, 25 Jul 2023 15:16:35 +0000 (09:16 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 1 Aug 2023 18:56:52 +0000 (12:56 -0600)
commit21db866dc69c481cd79b4d739c2170a7ef9b98fd
treea88d2526976cb7846d1ea793c044f5c7e62ee6bc
parent8a8a5ccadd18b9f1ecb7943bf56fad29c6f529bc
Implement DAP 'terminated' event

This implements the DAP 'terminated' event.  Vladimir Makaev noticed
that VSCode will not report the debug session as over unless this is
sent.

It's not completely clear when exactly this event ought to be sent.
Here I've done it when the inferior exits.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30681
gdb/python/lib/gdb/dap/events.py
gdb/python/lib/gdb/dap/server.py
gdb/testsuite/gdb.dap/terminate.exp [new file with mode: 0644]