From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20563 invoked by alias); 31 Aug 2007 07:06:10 -0000 Received: (qmail 20528 invoked by uid 22791); 31 Aug 2007 07:06:08 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 31 Aug 2007 07:06:02 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1IR0Zq-00082j-8F for gdb-patches@sources.redhat.com; Fri, 31 Aug 2007 11:05:58 +0400 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1IR0Zb-00082M-48; Fri, 31 Aug 2007 11:05:43 +0400 From: Vladimir Prus To: Eli Zaretskii Subject: Re: [mi] -list-features Date: Fri, 31 Aug 2007 07:06:00 -0000 User-Agent: KMail/1.9.6 Cc: drow@false.org, gdb-patches@sources.redhat.com References: <200708282147.18298.ghost@cs.msu.su> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708311105.38612.ghost@cs.msu.su> 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: 2007-08/txt/msg00539.txt.bz2 On Wednesday 29 August 2007 21:55:28 Eli Zaretskii wrote: > > From: Vladimir Prus > > Date: Tue, 28 Aug 2007 21:47:17 +0400 > > Cc: gdb-patches@sources.redhat.com > > > > -list-features > > Returns a list of particular features of the MI protocol that > > this version of gdb implements. A feature can be a command, > > or a new field in an output of some command, or even an > > important bugfix. While a frontend can sometimes detect presence > > of a feature at runtime, it is easier to perform detection at debugger > > startup. The current list of features is: > > > > - 'frozen-varobjs' -- indicates presence of -var-set-frozen command, > > as well as possible presense of the 'frozen' field in the output of > > -varobj-create. > > ......... > > This is fine, but for it to be useful to front ends, I think you need > to tell more about the format of the output, because a program will > need to parse and understand it. Let's say I want to test for the > support of a feature name "frobnicate", how would I go about it? How about this: -list-features Returns a list of particular features of the MI protocol that this version of gdb implements. A feature can be a command, or a new field in an output of some command, or even an important bugfix. While a frontend can sometimes detect presence of a feature at runtime, it is easier to perform detection at debugger startup. The command returns a list of strings, with each string naming an available feature. Each returned string is just a name, it does not have any internal structure. The list of possible feature names is given below. The current list of features is: - 'frozen-varobjs' -- indicates presence of -var-set-frozen command, as well as possible presense of the 'frozen' field in the output of -varobj-create. - Volodya