]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Implement the notStopped DAP response
authorTom Tromey <tromey@adacore.com>
Tue, 7 Nov 2023 15:44:44 +0000 (08:44 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 17 Nov 2023 15:26:03 +0000 (08:26 -0700)
commitcfd00e8050a58aacc6489ec0379908be1a12be73
tree55a069a9d7ab99c21625378701e763b90a37403e
parent68caad9d0b06d0ac231ce083ff62410a5a1806c1
Implement the notStopped DAP response

DAP specifies that a request can fail with the "notStopped" message if
the inferior is running but the request requires that it first be
stopped.

This patch implements this for gdb.  Most requests are assumed to
require a stopped inferior, and the exceptions are noted by a new
'request' parameter.

You may notice that the implementation is a bit racy.  I think this is
inherent -- unless the client waits for a stop event before sending a
request, the request may be processed at any time relative to a stop.

https://sourceware.org/bugzilla/show_bug.cgi?id=31037

Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com>
gdb/python/lib/gdb/dap/events.py
gdb/python/lib/gdb/dap/pause.py
gdb/python/lib/gdb/dap/server.py
gdb/testsuite/gdb.dap/pause.exp