Use std::list for event notifications in gdbserver
authorTom Tromey <tom@tromey.com>
Sun, 7 Apr 2019 22:17:40 +0000 (16:17 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 19 Apr 2019 20:29:32 +0000 (14:29 -0600)
commitb494cdff6922944383ef4dc20fcc90c4d823d315
treecb98e6f414bd464bc5edb3709c1554a39c30620d
parentcf250e36790aaa255bb486e2122bb83c95c7669b
Use std::list for event notifications in gdbserver

This changes gdbserver to use std::list rather than common/queue.h for
event notifications.

gdb/gdbserver/ChangeLog
2019-04-19  Tom Tromey  <tom@tromey.com>

* server.c (struct vstop_notif): Derive from notif_event.
<base>: Remove.
(queue_stop_reply): Update.
(remove_all_on_match_ptid): Change type.  Rewrite.
(discard_queued_stop_replies): Rewrite.
(in_queued_stop_replies_ptid): Change type.
(in_queued_stop_replies): Rewrite.
(notif_stop): Update.
(queue_stop_reply_callback): Update.
(captured_main): Don't call initialize_notif.
(push_stop_notification): Update.
* notif.c (notif_write_event, handle_notif_ack)
(notif_event_enque, notif_push): Update.
(notif_event_xfree, initialize_notif): Remove.
* notif.h (struct notif_event): Include <list>, not
"common/queue.h".
(struct notif_server) <queue>: Now a std::list.
(notif_event_p): Remove typedef.
(initialize_notif): Don't declare.
(struct notif_event): Add virtual destructor.
gdb/gdbserver/ChangeLog
gdb/gdbserver/notif.c
gdb/gdbserver/notif.h
gdb/gdbserver/server.c