From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E8ED38515FA; Thu, 15 Apr 2021 17:58:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E8ED38515FA 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: Thu, 15 Apr 2021 17:58:05 +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: Thu, 15 Apr 2021 17:58:05 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27710 --- Comment #19 from Simon Marchi --- I don't really understand this supposed separation of concerns between remo= te.c and remote-notif.c. They both know about each other: remote_target (well, remote_state) uses remote_notif_state, and remote_notif_state (and notif_client) only works with remote_target as its user. Anyway. To avoid all this churn, I'd be fine with a new util function "remote_target_is_non_stop", implemented in remote.c, like: bool remote_target_is_non_stop_p (remote_target *t) { scoped_restore_current_thread restore_thread; switch_to_target_no_thread (t); return target_is_non_stop_p (); } You could then use gdb_assert (remote_target_is_non_stop_p (remote_target)) in remote-notif.c. If / when target_is_non_stop_p becomes a method on target_ops and hopefully independent from the current context, it could be simplified to: bool remote_target_is_non_stop_p (remote_target *t) { return t->is_non_stop_p (); } --=20 You are receiving this mail because: You are on the CC list for the bug.=