From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109848 invoked by alias); 17 Mar 2016 22:21:13 -0000 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 Received: (qmail 109833 invoked by uid 89); 17 Mar 2016 22:21:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 17 Mar 2016 22:21:08 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id D8B09811A2; Thu, 17 Mar 2016 22:21:06 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2HML54s013895; Thu, 17 Mar 2016 18:21:06 -0400 Subject: Re: [PATCH] gdb/remote: Don't use vKill if multi-process features are disabled To: Andrew Burgess , gdb-patches@sourceware.org References: <1458252144-3496-1-git-send-email-andrew.burgess@embecosm.com> From: Pedro Alves Message-ID: <56EB2DD1.4090103@redhat.com> Date: Thu, 17 Mar 2016 22:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1458252144-3496-1-git-send-email-andrew.burgess@embecosm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-03/txt/msg00317.txt.bz2 On 03/17/2016 10:02 PM, Andrew Burgess wrote: > The below was tested using native gdbserver on x86-64 Fedora Linux > with no regressions. > > --- > > The gdb remote protocol documentation is clear that the vKill command > should not be used unless the multi-process feature is reported as > supported by the remote target. > > Currently within gdb we check to see if the vKill packet is enabled or > not before using the vKill command, however, the only way to disable > vKill is from the gdb console, the result is that vKill will be sent to > targets that don't support it, and never claimed to support it. Why was that a problem? > > After this commit I guard use of vKill with a check to see if the > multi-process feature is enabled or not. I have removed the ability to > disable vkill specifically from the console, the user must now disable > the whole multi-process feature set as one. > > I did consider leaving the separate vKill control switch in addition to > the multi-process control switch, but this seemed unnecessary, and I > worried that in the future another bug could be introduced where > PACKET_vKill was used to guard sending a vKill. Please leave the control switch in. It's useful for testing, to emulate targets that don't support the packet. Thanks, Pedro Alves