public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Simon Farre <simon.farre.cx@gmail.com>
Cc: gdb-patches@sourceware.org, tom@tromey.com
Subject: Re: [PATCH v2] [gdb/python]: Add StepEndedEvent (simplifies DAP)
Date: Mon, 16 Oct 2023 22:05:47 +0300	[thread overview]
Message-ID: <83ttqqo0ac.fsf@gnu.org> (raw)
In-Reply-To: <20231016155009.156773-1-simon.farre.cx@gmail.com> (message from Simon Farre on Mon, 16 Oct 2023 17:50:09 +0200)

> From: Simon Farre <simon.farre.cx@gmail.com>
> Cc: tom@tromey.com,
> 	Simon Farre <simon.farre.cx@gmail.com>
> Date: Mon, 16 Oct 2023 17:50:09 +0200
> 
> Bug fix at py-stopevent.c:105.
> 
> Adds the StepEndedEvent which signals that one of the thread finite state machines
> finished. Matches the behavior of what is generated by MI; the "end stepping range".
> 
> This should simplify some of the DAP code, where "expected stop reason" is being tracked.
> This logic should be handled by the Python interpreter to begin with, instead.
> ---
>  gdb/NEWS                      |  3 +++
>  gdb/doc/python.texi           |  3 +++
>  gdb/python/py-event-types.def |  5 +++++
>  gdb/python/py-stopevent.c     | 20 ++++++++++++++++++++
>  4 files changed, 31 insertions(+)
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index 81264c0cfb3..b2abaa6a2ce 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -11,6 +11,9 @@
>    ** New function gdb.notify_mi(NAME, DATA), that emits custom
>       GDB/MI async notification.
>  
> +  ** Added StepEndedEvent which is emitted during stops where it could be determined
> +     that what triggered the stop was that the stepping state machine finished.
> +
>  *** Changes in GDB 14
>  
>  * GDB now supports the AArch64 Scalable Matrix Extension 2 (SME2), which
> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index 546b4d4b962..c6968791eb1 100644
> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -3733,6 +3733,9 @@ registry extend @code{gdb.StopEvent}.  As a child of
>  thread when @value{GDBN} is running in non-stop mode.  Refer to
>  @code{gdb.ThreadEvent} above for more details.
>  
> +Emits @code{gdb.StepEndedEvent} that signals that this stop event was generated
> +because one of the step-like commands finished.
> +
>  Emits @code{gdb.SignalEvent}, which extends @code{gdb.StopEvent}.
>  
>  This event indicates that the inferior or one of its threads has

My review comments from v1 were not taken care of, it seems.

      reply	other threads:[~2023-10-16 19:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 15:50 Simon Farre
2023-10-16 19:05 ` Eli Zaretskii [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=83ttqqo0ac.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.farre.cx@gmail.com \
    --cc=tom@tromey.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).