Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb] Fix assert in remote_async_get_pending_events_handler
Date: Thu, 22 Apr 2021 16:17:00 +0100	[thread overview]
Message-ID: <20210422151700.GP2610@embecosm.com> (raw)
In-Reply-To: <a76307a5-2b35-1766-e798-395bba22cca3@polymtl.ca>

* Simon Marchi <simon.marchi@polymtl.ca> [2021-04-22 09:33:28 -0400]:

> On 2021-04-22 7:03 a.m., Tom de Vries wrote:
> > On 4/22/21 12:19 PM, Andrew Burgess wrote:
> >> * Tom de Vries <tdevries@suse.de> [2021-04-22 10:51:29 +0200]:
> >>
> >>> Hi,
> >>>
> >>> Occassionally I run into the following assert:
> >>> ...
> >>> (gdb) PASS: gdb.multi/multi-target-continue.exp: inferior 5
> >>> Remote debugging from host ::1, port 49990^M
> >>> Process multi-target-continue created; pid = 31241^M
> >>> src/gdb/remote-notif.c:113: internal-error: \
> >>>   void remote_async_get_pending_events_handler(gdb_client_data): \
> >>>   Assertion `target_is_non_stop_p ()' failed.^M
> >>> ...
> >>>
> >>> The assert checks target_is_non_stop_p, which is related to the current
> >>> target.
> >>>
> >>> Fix this by changing the assert such that it checks non-stopness related to
> >>> the event it's handling.
> >>>
> >>> Tested on x86_64-linux.
> >>>
> >>> Any comments?
> >>
> >> This seems fine to me.  I wonder though if you considered converting
> >> target_is_non_stop_p into a member function on target_ops?
> >> If we did
> >> then we would avoid having to switch targets just to ask this
> >> question.  All of the helper functions that target_is_non_stop_p calls
> >> are already available as member functions so there would be no
> >> additional changes needed I think.
> >>
> > 
> > Um, I'm the one who ran into the problem, Simon is the one who came up
> > with the fix, so I guess this is a question for him.  I'm afraid I'm not
> > familiar with this code at all.
> 
> This was proposed in the bug as well:
> 
>   https://sourceware.org/bugzilla/show_bug.cgi?id=27710#c16
> 
> I am not against it, but I think Tom's patch is OK, given it follows
> current practices.

I agree, I'm certainly not blocking the patch.

Thanks,
Andrew

      reply	other threads:[~2021-04-22 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22  8:51 Tom de Vries
2021-04-22 10:19 ` Andrew Burgess
2021-04-22 11:03   ` Tom de Vries
2021-04-22 13:33     ` Simon Marchi via Gdb-patches
2021-04-22 15:17       ` Andrew Burgess [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=20210422151700.GP2610@embecosm.com \
    --to=andrew.burgess@embecosm.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