From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Initial implementation of Debugger Adapter Protocol
Date: Fri, 6 Jan 2023 15:12:25 +0100 [thread overview]
Message-ID: <a6ca8f52-fac5-ddfe-b826-5443857e3e43@suse.de> (raw)
In-Reply-To: <f021d06d-d733-1b47-2cdb-8684cb213c02@suse.de>
On 1/5/23 17:17, Tom de Vries via Gdb-patches wrote:
> On 1/5/23 16:24, Tom Tromey wrote:
>>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>>
>> Tom> In case you haven't seen it, on IRC someone mentioned:
>>
>> I didn't.
>>
>> Tom> diff --git a/gdb/python/lib/gdb/dap/io.py
>> b/gdb/python/lib/gdb/dap/io.py
>> Tom> index 656ac08b4ec..1d561f07665 100644
>> Tom> --- a/gdb/python/lib/gdb/dap/io.py
>> Tom> +++ b/gdb/python/lib/gdb/dap/io.py
>> Tom> @@ -22,7 +22,7 @@ def read_json(stream):
>> Tom> """Read a JSON-RPC message from STREAM.
>> Tom> The decoded object is returned."""
>> Tom> # First read and parse the header.
>> Tom> - content_length = None
>> Tom> + content_length = 0
>> Tom> while True:
>> Tom> line = stream.readline()
>> Tom> line = line.strip()
>>
>> In this case, though, the protocol request is malformed and I think it's
>> fine for gdb to just give up.
>>
>
> I see.
>
>> TBH I am not sure what should officially happen for a malformed request.
>> I don't think the docs I read address this.
>
> Agreed, I also couldn't find that info.
>
> I suppose we can try to use a more intuitive message for the exception,
> say "malformed DAP request".
I could try to implement this, but I haven't found a way to trigger the
exception, so I can't test a potential implementation.
Also I wonder if I trigger it, will the exception message show up ( see
https://sourceware.org/bugzilla/show_bug.cgi?id=29968 ).
Anyway, I'm parking this for now.
Thanks,
- Tom
prev parent reply other threads:[~2023-01-06 14:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 16:30 Tom Tromey via Gdb-patches
2022-09-01 16:38 ` Eli Zaretskii via Gdb-patches
2022-09-12 19:54 ` Tom Tromey via Gdb-patches
2022-09-13 2:26 ` Eli Zaretskii via Gdb-patches
2022-10-06 14:27 ` Tom Tromey via Gdb-patches
2023-01-02 16:54 ` Tom Tromey via Gdb-patches
2023-01-03 8:04 ` Tom de Vries via Gdb-patches
2023-01-03 14:14 ` Tom Tromey via Gdb-patches
2023-01-04 11:59 ` Tom de Vries via Gdb-patches
2023-01-04 12:27 ` Tom de Vries via Gdb-patches
2023-01-05 9:49 ` [PATCH] [gdb/python] Avoid queue.SimpleQueue for python 3.6 Tom de Vries via Gdb-patches
2023-01-05 15:19 ` Tom Tromey via Gdb-patches
2023-01-05 16:34 ` Tom de Vries via Gdb-patches
2023-01-05 17:07 ` Tom Tromey via Gdb-patches
2023-01-05 11:35 ` [PATCH] Initial implementation of Debugger Adapter Protocol Tom de Vries via Gdb-patches
2023-01-05 15:24 ` Tom Tromey via Gdb-patches
2023-01-05 16:17 ` Tom de Vries via Gdb-patches
2023-01-06 14:12 ` Tom de Vries via Gdb-patches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6ca8f52-fac5-ddfe-b826-5443857e3e43@suse.de \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=tromey@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox