From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2006 invoked by alias); 14 Dec 2012 09:53:48 -0000 Received: (qmail 1994 invoked by uid 22791); 14 Dec 2012 09:53:46 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Dec 2012 09:53:39 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBE9rcuk000532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Dec 2012 04:53:38 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBE9raQw022264; Fri, 14 Dec 2012 04:53:37 -0500 Message-ID: <50CAF720.9040704@redhat.com> Date: Fri, 14 Dec 2012 09:53:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Attach discard_pending_stop_replies to observer inferior_exit References: <1354848657-10348-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1354848657-10348-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00484.txt.bz2 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