Remove use of queue from remote.c
authorTom Tromey <tom@tromey.com>
Thu, 7 Jun 2018 12:26:55 +0000 (06:26 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 11 Jun 2018 04:31:19 +0000 (22:31 -0600)
commit953edf2b6cfe765ca7176c414e9f63aa62bdb09c
tree3e0077c1d4b0e0e84fd1f3f156f08749f48f92f6
parent1ddbba9df5fda9b1af5306fe182a5f1c3197f53a
Remove use of queue from remote.c

This removes a use of the queue data structure (common/queue.h) from
remote.c.

The queue is replaced with a std::vector.  A queue was not needed, as
the code never de-queued items.

This removes quite a bit of boilerplate code, mostly involved with
marshalling arguments to be passed through the queue iterator.

Tested by the buildbot.

gdb/ChangeLog
2018-06-10  Tom Tromey  <tom@tromey.com>

* remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
(class remote_state) <stop_reply_queue>: Now std::vector.
(remote_state::~remote_state)
(remote_target::stop_reply_queue_length): Update.
(struct queue_iter_param, remove_child_of_pending_fork)
(struct check_pending_event_prevents_wildcard_vcont_callback_data)
(check_pending_event_prevents_wildcard_vcont_callback)
(remove_stop_reply_for_inferior)
(remove_stop_reply_of_remote_state)
(remote_notif_remove_once_on_match)
(stop_reply_match_ptid_and_ws)
(remote_kill_child_of_pending_fork): Remove.
(remote_target::remove_new_fork_children)
(remote_target::check_pending_events_prevent_wildcard_vcont)
(remote_target::discard_pending_stop_replies)
(remote_target::discard_pending_stop_replies_in_queue)
(remote_target::remote_notif_remove_queued_reply)
(remote_target::queued_stop_reply)
(remote_target::push_stop_reply, remote_target::peek_stop_reply)
(remote_target::wait, remote_target::kill_new_fork_children)
(remote_target::async): Update.
gdb/ChangeLog
gdb/remote.c