From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Handle gdb.LazyString in DAP
Date: Thu, 05 Oct 2023 19:14:47 +0300 [thread overview]
Message-ID: <831qe93v2g.fsf@gnu.org> (raw)
In-Reply-To: <20231005-two-dap-fixes-v1-2-729c66007217@adacore.com> (message from Tom Tromey via Gdb-patches on Thu, 05 Oct 2023 07:34:47 -0600)
> Date: Thu, 05 Oct 2023 07:34:47 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
>
> Andry pointed out that the DAP code did not properly handle
> gdb.LazyString results from a pretty-printer, yielding:
>
> TypeError: Object of type LazyString is not JSON serializable
>
> This patch fixes the problem, partly with a small patch in varref.py,
> but mainly by implementing tp_str for LazyString.
> ---
> gdb/NEWS | 2 +
> gdb/python/lib/gdb/dap/varref.py | 2 +-
> gdb/python/py-lazy-string.c | 28 +++++++++++-
> gdb/testsuite/gdb.dap/lazy-string.c | 23 ++++++++++
> gdb/testsuite/gdb.dap/lazy-string.exp | 80 +++++++++++++++++++++++++++++++++++
> gdb/testsuite/gdb.dap/lazy-string.py | 37 ++++++++++++++++
> 6 files changed, 170 insertions(+), 2 deletions(-)
Thanks, the NEWS part is okay.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2023-10-05 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 13:34 [PATCH 0/2] Two more small DAP / Python fixes Tom Tromey
2023-10-05 13:34 ` [PATCH 1/2] Fix register-setting response from DAP Tom Tromey
2023-10-05 13:34 ` [PATCH 2/2] Handle gdb.LazyString in DAP Tom Tromey
2023-10-05 16:14 ` Eli Zaretskii [this message]
2023-10-16 15:19 ` [PATCH 0/2] Two more small DAP / Python fixes Tom Tromey
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=831qe93v2g.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).