From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13211 invoked by alias); 25 Jan 2013 17:41:08 -0000 Received: (qmail 13203 invoked by uid 22791); 25 Jan 2013 17:41:07 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,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, 25 Jan 2013 17:40:31 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0PHeC7l019512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 Jan 2013 12:40:21 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0PHeAHY031629; Fri, 25 Jan 2013 12:40:11 -0500 Message-ID: <5102C37A.6080307@redhat.com> Date: Fri, 25 Jan 2013 17:41:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Yao Qi Subject: Re: [PATCH 1/2] Fix error when GDB connects to GDBserver with qC disabled References: <1358930116-29038-1-git-send-email-yao@codesourcery.com> <510169A9.7090002@redhat.com> <510261A5.1080200@codesourcery.com> <5102C106.5060703@redhat.com> In-Reply-To: <5102C106.5060703@redhat.com> Content-Type: text/plain; charset=UTF-8 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: 2013-01/txt/msg00636.txt.bz2 On 01/25/2013 05:29 PM, Pedro Alves wrote: > On 01/25/2013 10:42 AM, Yao Qi wrote: >>> + >>> + This function is called after handling the '?' or 'vRun' packets, >>> + whose response is a stop reply from which we can also try >>> + extracting the thread. If the target doesn't support the explicit >>> + qC query, we infer the current thread from that stop reply, passed >>> + in in WAIT_STATUS, which may be NULL. */ >> >> redundant "in"? > > Sounds right to me as is. Read as, the stop reply is "passed in". > But where?, "in WAITSTATUS". I'll change it to something else if > a native speaker prefers it. Actually, never mind that... I've updated the other comment to mention we now try T first, but forgot to update that comment above. Applied. -- Pedro Alves Fix add_current_inferior_and_thread's describing comment. add_current_inferior_and_thread tries the stop reply first. Tweak its comment to reflect reality. 2013-01-25 Pedro Alves * remote.c (add_current_inferior_and_thread): Tweak comment. Index: src/gdb/remote.c =================================================================== --- src.orig/gdb/remote.c +++ src/gdb/remote.c @@ -3268,10 +3268,10 @@ stop_reply_extract_thread (char *stop_re to return the current thread. This function is called after handling the '?' or 'vRun' packets, - whose response is a stop reply from which we can also try - extracting the thread. If the target doesn't support the explicit - qC query, we infer the current thread from that stop reply, passed - in in WAIT_STATUS, which may be NULL. */ + whose response is a stop reply from which we can try extracting the + current thread, so we try that first. WAIT_STATUS is that stop + reply. It may be NULL if a stop reply is not + available/applicable. */ static void add_current_inferior_and_thread (char *wait_status)