[gdb/dap] Add logging of ignored lines
authorTom de Vries <tdevries@suse.de>
Fri, 24 Mar 2023 08:08:10 +0000 (09:08 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 24 Mar 2023 08:08:10 +0000 (09:08 +0100)
commit8ee55b880fbabe0a20bf4adc1ba68307ba8a02be
treebe59aa935a910c7785cee72fafcc5b0d463552ef
parent232c5cec145a21e3cf602e86a90dec4bc5f9ca67
[gdb/dap] Add logging of ignored lines

This input sequence is accepted by DAP:
...
{"seq": 4, "type": "request", "command": "configurationDone"}Content-Length: 84
...

This input sequence has the same effect:
...
{"seq": 4, "type": "request", "command": "configurationDone"}ignorethis
Content-Length: 84
...
but the 'ignorethis' part is silently ignored.

Log the ignored bit, such that we have:
...
READ: <<<{"seq": 4, "type": "request", "command": "configurationDone"}>>>
WROTE: <<<{"request_seq": 4, "type": "response", "command": "configurationDone"
, "success": true}>>>
+++ run
IGNORED: <<<b'ignorethis'>>>
...
gdb/python/lib/gdb/dap/io.py