mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
DAP: accept requests with '"arguments": null'
Some Debug Adapter Protocol clients like Helix set the optional "arguments" field of the ConfigurationDone request to null, which is a bit odd but seems to be allowed by the protocol specification. Before this patch, Python exceptions would be raised on such requests. This patch makes it so these requests are treated as if the "arguments" field was absent.
This commit is contained in:
parent
60a614d2a5
commit
d00a99716d
1 changed files with 9 additions and 1 deletions
|
|
@ -312,7 +312,15 @@ class Server:
|
|||
}
|
||||
|
||||
if "arguments" in params:
|
||||
args = params["arguments"]
|
||||
# Since the "arguments" field is optional, setting it to
|
||||
# null is an odd thing to do when one could simply omit it
|
||||
# entirely. But some clients do just that for some
|
||||
# requests (e.g. Helix for ConfigurationDone), so we
|
||||
# accommodate this case.
|
||||
if params["arguments"] is None:
|
||||
args = {}
|
||||
else:
|
||||
args = params["arguments"]
|
||||
else:
|
||||
args = {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue