Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] gdb: make record-btrace target clear its async event handler in wait
Date: Wed, 6 Jan 2021 09:50:46 +0000	[thread overview]
Message-ID: <20210106095046.GG2945@embecosm.com> (raw)
In-Reply-To: <20201130165251.830482-4-simon.marchi@efficios.com>

* Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> [2020-11-30 11:52:50 -0500]:

> For the same reason explained in the previous patch (which was for the
> remote target), move clearing of the async event handler of the
> record-btrace target to the wait method.
> 
> The record-btrace target already re-sets its async event handler if
> needed in its wait method, so that part doesn't need to be changed:
> 
>     /* In async mode, we need to announce further events.  */
>     if (target_is_async_p ())
>       record_btrace_maybe_mark_async_event (moving, no_history);
> 
> gdb/ChangeLog:
> 
> 	* record-btrace.c (record_btrace_handle_async_inferior_event):
> 	Don't clear async event handler.
> 	(record_btrace_target::wait): Clear async event handler at
> 	beginning.

LGTM.

> 
> Change-Id: Ib32087a81bf94f1b884a938c8167ac8bbe09e362
> ---
>  gdb/record-btrace.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
> index d5338c74aed..aca76dae0dd 100644
> --- a/gdb/record-btrace.c
> +++ b/gdb/record-btrace.c
> @@ -326,7 +326,6 @@ record_btrace_auto_disable (void)
>  static void
>  record_btrace_handle_async_inferior_event (gdb_client_data data)
>  {
> -  clear_async_event_handler (record_btrace_async_inferior_event_handler);
>    inferior_event_handler (INF_REG_EVENT);
>  }
>  
> @@ -2543,6 +2542,9 @@ record_btrace_target::wait (ptid_t ptid, struct target_waitstatus *status,
>    std::vector<thread_info *> moving;
>    std::vector<thread_info *> no_history;
>  
> +  /* Clear this, if needed we'll re-mark it below.  */
> +  clear_async_event_handler (record_btrace_async_inferior_event_handler);
> +
>    DEBUG ("wait %s (0x%x)", target_pid_to_str (ptid).c_str (),
>  	 (unsigned) options);
>  
> -- 
> 2.29.2
> 

  reply	other threads:[~2021-01-06  9:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 16:52 [PATCH 0/4] Clear target async event handlers in wait method Simon Marchi via Gdb-patches
2020-11-30 16:52 ` [PATCH 1/4] gdb: make async event handlers clear themselves Simon Marchi via Gdb-patches
2020-12-24 17:26   ` Andrew Burgess
2021-02-04 17:42   ` Pedro Alves
2021-02-04 18:15     ` Simon Marchi via Gdb-patches
2020-11-30 16:52 ` [PATCH 2/4] gdb: make remote target clear its async event handler in wait Simon Marchi via Gdb-patches
2020-12-24 17:23   ` Andrew Burgess
2020-12-24 17:44     ` Simon Marchi via Gdb-patches
2021-02-04 18:00   ` Pedro Alves
2021-02-04 18:34     ` Simon Marchi via Gdb-patches
2020-11-30 16:52 ` [PATCH 3/4] gdb: make record-btrace " Simon Marchi via Gdb-patches
2021-01-06  9:50   ` Andrew Burgess [this message]
2020-11-30 16:52 ` [PATCH 4/4] gdb: make record-full " Simon Marchi via Gdb-patches
2021-01-06  9:51   ` Andrew Burgess
2020-12-23 21:31 ` [PATCH 0/4] Clear target async event handlers in wait method Simon Marchi via Gdb-patches

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=20210106095046.GG2945@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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