From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 750F2396EC48; Wed, 14 Apr 2021 17:03:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 750F2396EC48 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/27710] remote-notif.c:113: internal-error: void remote_async_get_pending_events_handler(gdb_client_data): Assertion `target_is_non_stop_p ()' failed Date: Wed, 14 Apr 2021 17:03:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 17:03:24 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27710 --- Comment #15 from Simon Marchi --- (In reply to Tom de Vries from comment #14) > I just stumbled upon remote_unpush_target, and it seems one remote_target > can be associated with multiple inferiors. So at this point I'm not sure > how one would select the "right" inferior. Indeed, one remote target can handle multiple inferiors (if using extended-remote). The right inferior in this case would be any inferior of that target. Maki= ng any inferior of this remote target the current inferior implicitly makes th= is remote target the current one, such that target_is_non_stop_p will hit that remote target. If the current inferior is one that does not belong to that remote target, then target_is_non_stop_p is really asking whether some other unrelated target is non-stop. So adding a call to switch_to_target_no_thread should make it work (it just makes an arbitrary inferior of the target the current one). Another option, instead of switching the current inferior, would be to make target_is_non_stop accept a target: gdb_assert (target_is_non_stop_p (notif_state->remote)); And pass down the target to everything below. It would be a bit more work,= and we would have to make sure everything called by target_is_non_stop_p doesn't use the global context. This looks like a problem that happens quite rarely though, it would be nic= e to have a way to reproduce it all the time, by adding some delay somewhere or otherwise. --=20 You are receiving this mail because: You are on the CC list for the bug.=