public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Andrew Burgess <aburgess@redhat.com>,
	Simon Marchi <simon.marchi@polymtl.ca>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] gdb: add assertion when marking the remote async flag
Date: Tue, 10 Oct 2023 11:01:50 -0400	[thread overview]
Message-ID: <61054ea7-50b4-4183-b4ec-c8e0bad85bf1@efficios.com> (raw)
In-Reply-To: <87a5ssdu5l.fsf@redhat.com>

On 10/9/23 05:25, Andrew Burgess wrote:
> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
>> From: Simon Marchi <simon.marchi@efficios.com>
>>
>> As reported in bug 30630 [1], we hit a case where the remote target's
>> async flag is marked while the target is not configured (yet) to work
>> async.  This should not happen.  It is caught thanks to this assert in
>> remote_target::wait:
>>
>>     /* Start by clearing the flag that asks for our wait method to be called,
>>        we'll mark it again at the end if needed.  If the target is not in
>>        async mode then the async token should not be marked.  */
>>     if (target_is_async_p ())
>>       rs->clear_async_event_handler ();
>>     else
>>       gdb_assert (!rs->async_event_handler_marked ());
>>
>> This is helpful, but I think that we could have caught the problem earlier than
>> that, at the moment we marked the handler.  Catching problems earlier
>> makes them easier to debug.
> 
> Agreed.  Looked through this series, all looks good.  I had a few nits
> that I reported, but otherwise:
> 
> Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks, I'll push if my CI run is clean with the changes applied.

Simon

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04  2:03 [PATCH 0/3] Add " Simon Marchi
2023-10-04  2:03 ` [PATCH 1/3] gdb: make remote_state's async token private Simon Marchi
2023-10-09  9:11   ` Andrew Burgess
2023-10-10 14:56     ` Simon Marchi
2023-10-04  2:04 ` [PATCH 2/3] gdb: add remote_state::{is_async_p,can_async_p} Simon Marchi
2023-10-09  9:20   ` Andrew Burgess
2023-10-10 15:01     ` Simon Marchi
2023-10-04  2:04 ` [PATCH 3/3] gdb: add assertion when marking the remote async flag Simon Marchi
2023-10-06 21:09   ` Terekhov, Mikhail
2023-10-07  1:35     ` Simon Marchi
2023-10-09  9:25   ` Andrew Burgess
2023-10-10 15:01     ` Simon Marchi [this message]
2023-10-06 21:28 ` [PATCH 0/3] Add " Terekhov, Mikhail

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=61054ea7-50b4-4183-b4ec-c8e0bad85bf1@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).