From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B3FDE3A13CE9; Thu, 22 Apr 2021 08:53:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3FDE3A13CE9 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug remote/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: Thu, 22 Apr 2021 08:53:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org 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: Thu, 22 Apr 2021 08:53:05 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27710 --- Comment #20 from Tom de Vries --- (In reply to Simon Marchi from comment #19) > I don't really understand this supposed separation of concerns between > remote.c and remote-notif.c. They both know about each other: remote_tar= get > (well, remote_state) uses remote_notif_state, and remote_notif_state (and > notif_client) only works with remote_target as its user. Anyway. >=20 > To avoid all this churn, I'd be fine with a new util function > "remote_target_is_non_stop", implemented in remote.c, like: >=20 > bool > remote_target_is_non_stop_p (remote_target *t) > { > scoped_restore_current_thread restore_thread; > switch_to_target_no_thread (t); >=20 > return target_is_non_stop_p (); > } >=20 > You could then use >=20 > gdb_assert (remote_target_is_non_stop_p (remote_target)) >=20 > in remote-notif.c. >=20 > If / when target_is_non_stop_p becomes a method on target_ops and hopeful= ly > independent from the current context, it could be simplified to: >=20 > bool > remote_target_is_non_stop_p (remote_target *t) > { > return t->is_non_stop_p (); > } Submitted as https://sourceware.org/pipermail/gdb-patches/2021-April/178027.html --=20 You are receiving this mail because: You are on the CC list for the bug.=