public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jan Vrany <jan.vrany@labware.com>
To: gdb-patches@sourceware.org
Cc: Jan Vrany <jan.vrany@labware.com>
Subject: [PATCH v3 0/2] gdb/python: implement support for sending custom MI async
Date: Fri,  6 Oct 2023 16:11:04 +0100	[thread overview]
Message-ID: <20231006151106.315633-1-jan.vrany@labware.com> (raw)
In-Reply-To: <87bkddtamc.fsf@redhat.com>

I hope I addressed all comments raised by Andrew for V2 series

Changes since V2:

* Fixed formatting errors in patch 1 of this series
* Fixed formatting errors in patch 2 of this series
* Added report name of incorrect data type into error message
  as suggested.
* Moved target_terminal::ours_for_output () right after the
  check if UI is an MI UI as suggested.
* Fixed tests.

Changes since V1:

* Moved serialize_mi_result and helpers to py-mi.c as suggested.
  Also, renamed serialize_mi_result to serialize_mi_results
  instead of serialize_mi_data and do not rename serialize_mi_result_1.

  The reason for this is that GDB documentation,
  section GDB/MI Output Syntax, describes "result" being single 'variable = value'
  pair and "result-record" and "async-output" contains zero or more of these "result"s,
  so calling top-level serialization function serialize_mi_results seems
  a better name than serialize_mi_data (used in previous version).

* Made gdb.notify_mi DATA parameter optional as suggested.

* Validate gdb.notify_mi NAME parameter as suggested.

* Updated documentation:
  * example formatted as black tool would do it,
  * rephrase some sentences as suggested,
  * document that DATA parameter is optional,
  * document restrictions on NAME parameter and
  * document that users should prefix user-defined notification
    with hyphen to avoid possible conflicts.

Jan Vrany (2):
  gdb/python: generalize serialize_mi_result()
  gdb/python: implement support for sending custom MI async
    notifications

 gdb/NEWS                                  |   3 +
 gdb/doc/python.texi                       |  45 +++++
 gdb/python/py-mi.c                        | 233 ++++++++++++++++++++++
 gdb/python/py-micmd.c                     | 185 +----------------
 gdb/python/python-internal.h              |  18 ++
 gdb/python/python.c                       |   4 +
 gdb/testsuite/gdb.python/py-mi-notify.exp |  71 +++++++
 7 files changed, 383 insertions(+), 176 deletions(-)
 create mode 100644 gdb/testsuite/gdb.python/py-mi-notify.exp

-- 
2.40.1


  reply	other threads:[~2023-10-06 15:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 14:38 [PATCH v2 0/2] gdb/python: implement support for sending custom MI async notifications Jan Vrany
2023-09-13 14:38 ` [PATCH v2 1/2] gdb/python: generalize serialize_mi_result() Jan Vrany
2023-10-05 13:47   ` Andrew Burgess
2023-09-13 14:38 ` [PATCH v2 2/2] gdb/python: implement support for sending custom MI async notifications Jan Vrany
2023-09-13 15:11   ` Eli Zaretskii
2023-10-05 14:19   ` Andrew Burgess
2023-10-06 15:11     ` Jan Vrany [this message]
2023-10-06 15:11       ` [PATCH v3 1/2] gdb/python: generalize serialize_mi_result() Jan Vrany
2023-10-06 15:11       ` [PATCH v3 2/2] gdb/python: implement support for sending custom MI async notifications Jan Vrany
2023-10-09 10:49       ` [PATCH v3 0/2] gdb/python: implement support for sending custom MI async Andrew Burgess
2023-09-21 10:50 ` [PATCH v2 0/2] gdb/python: implement support for sending custom MI async notifications Jan Vraný
2023-09-27 18:56   ` [PING] " Jan Vraný
2023-10-05  9:20     ` Jan Vraný

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=20231006151106.315633-1-jan.vrany@labware.com \
    --to=jan.vrany@labware.com \
    --cc=gdb-patches@sourceware.org \
    /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).