From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24390 invoked by alias); 24 Jan 2013 17:23:16 -0000 Received: (qmail 24380 invoked by uid 22791); 24 Jan 2013 17:23:14 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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; Thu, 24 Jan 2013 17:23:07 +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 r0OHN6Mg024351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Jan 2013 12:23:06 -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 r0OHN4TF006309; Thu, 24 Jan 2013 12:23:05 -0500 Message-ID: <51016DF7.6010506@redhat.com> Date: Thu, 24 Jan 2013 17:23: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: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] Don't query stub if the pid is faked References: <1358930116-29038-1-git-send-email-yao@codesourcery.com> <1358930116-29038-2-git-send-email-yao@codesourcery.com> In-Reply-To: <1358930116-29038-2-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: 2013-01/txt/msg00599.txt.bz2 On 01/23/2013 08:35 AM, Yao Qi wrote: > This patch fixes this problem by skipping query to the stub is the pid is faked. Sorry, that's not correct. `qAttached:pid' Return an indication of whether the remote server attached to an existing process or created a new process. When the multiprocess protocol extensions are supported (...), pid is an integer in hexadecimal format identifying the target process. Otherwise, gdb will omit the pid field and the query ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ packet will be simplified as `qAttached'. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ And in that case, the pid will be faked. If the target supports the multiprocess extensions, then the T stop reply will include the "thread:ptid" bit, so my alternative patch to 1/2 also fixes this. We could perhaps add some warning, but I'm thinking it's not worth the bother. -- Pedro Alves -- Pedro Alves