[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
vries at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Thu Apr 22 08:53:05 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=27710
--- Comment #20 from Tom de Vries <vries at gcc dot gnu.org> ---
(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_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 ();
> }
Submitted as
https://sourceware.org/pipermail/gdb-patches/2021-April/178027.html
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list