[PATCH] Attach discard_pending_stop_replies to observer inferior_exit
Pedro Alves
palves@redhat.com
Fri Dec 14 09:53:00 GMT 2012
On 12/07/2012 02:50 AM, Yao Qi wrote:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -229,7 +229,6 @@ static void do_stop_reply_xfree (void *arg);
> static void remote_parse_stop_reply (char *buf, struct stop_reply *);
> static void push_stop_reply (struct stop_reply *);
> static void remote_get_pending_stop_replies (void);
> -static void discard_pending_stop_replies (int pid);
> static int peek_stop_reply (ptid_t ptid);
>
> static void remote_async_inferior_event_handler (gdb_client_data);
> @@ -3022,9 +3021,6 @@ remote_close (int quitting)
> inferior_ptid = null_ptid;
> discard_all_inferiors ();
>
> - /* We're no longer interested in any of these events. */
> - discard_pending_stop_replies (-1);
GDB can be learning about new processes it didn't know about yet
from some yet-unprocessed stop reply. So if we only clear stop replies
specific to each inferior, we'd leave those behind. But, we're closing
the remote target here. We really want to discard everything.
--
Pedro Alves
More information about the Gdb-patches
mailing list