From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21114 invoked by alias); 15 Oct 2014 16:17:19 -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 21101 invoked by uid 89); 15 Oct 2014 16:17:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Wed, 15 Oct 2014 16:17:17 +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 (8.14.4/8.14.4) with ESMTP id s9FGHF7O014100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Oct 2014 12:17:15 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9FGHDhe023859; Wed, 15 Oct 2014 12:17:14 -0400 Message-ID: <543E9E09.80009@redhat.com> Date: Wed, 15 Oct 2014 16:17:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Don Breazeal , gdb-patches@sourceware.org Subject: Re: [PATCH 04/16 v2] Determine supported extended-remote features References: <1407434395-19089-1-git-send-email-donb@codesourcery.com> <1408580964-27916-5-git-send-email-donb@codesourcery.com> In-Reply-To: <1408580964-27916-5-git-send-email-donb@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00403.txt.bz2 On 08/21/2014 01:29 AM, Don Breazeal wrote: > This patch implements a mechanism for GDB to ask gdbserver what > extended-mode features are enabled. > > The problems that are solved include: > > 1) A mechanism other than the qSupported RSP packet is needed for > gdbserver to inform GDB about the list of extended mode features that > are supported. Sorry, this doesn't really make sense to me. > > In the existing implementation most of the information about > supported gdbserver features is sent to GDB in response to a > qSupported RSP message. This exchange occurs prior to GDB > sending the "!" packet to enable extended mode. So as-is this > message doesn't work for features that are dependent on extended- > mode. The differences between extended and non-extended modes are very few, and I'd rather have fewer -- eventually merge them -- not more. I don't understand what motivated this. What's wrong with just reporting the features as supported in qSupported, and then have GDB decide whether to make use the features or not? > Also, the qSupported exchange is intended to inform GDB about which > packets are supported, and most of the extended mode features do not > have associated packets. There are some features included in the > qSupported response that do not have associated RSP messages, but the > code comments make it clear that this practice is not acceptable for new > packets. Which comments? > > 2) A mechanism is needed to enable extended mode features when GDB > tells gdbserver to use extended mode. > > The existing implementation checks for ptrace extended events > (just PTRACE_O_TRACELONE) and enables them immediately after checking. > This is done when the first event occurs as the program is loaded, which > can occur before GDB has connected to gdbserver and told it whether or > not to use extended mode. Thanks, Pedro Alves