From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10046 invoked by alias); 7 Oct 2004 12:48:29 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10036 invoked from network); 7 Oct 2004 12:48:27 -0000 Received: from unknown (HELO NUTMEG.CAM.ARTIMI.COM) (217.40.111.177) by sourceware.org with SMTP; 7 Oct 2004 12:48:27 -0000 Received: from mace ([192.168.1.25]) by NUTMEG.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.0); Thu, 7 Oct 2004 13:48:04 +0100 From: "Dave Korn" To: "'Bob Rossi'" Cc: "'Eli Zaretskii'" , Subject: RE: probing GDB for MI versions Date: Thu, 07 Oct 2004 14:28:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <20041007123557.GA14264@white> Message-ID: X-OriginalArrivalTime: 07 Oct 2004 12:48:05.0032 (UTC) FILETIME=[E36DD280:01C4AC6B] X-SW-Source: 2004-10/txt/msg00208.txt.bz2 > -----Original Message----- > From: 'Bob Rossi' > Sent: 07 October 2004 13:36 > > Yes, I can, but I'm not going to do it for you. Here's a > hint, in shell > > terms: > > > > echo "-mi-version" | gdb | grep "Highest supported MI > version is" | .... > > > > [you have to fill in the ... with some kind of sed or awk command] > OK, I agree with this. Why would we add this functionality as > an MI command > if the front ends all have to write some adhoc parser to get the > information? You use the term "adhoc parser" as if that were a bad thing. It's not. It's an entirely reasonable way for a computer program to parse some data and extract some simple information that it requires. > So, I agree that it can be done, I just think it's a terrible idea. > We can do it in a much better way. This is an invalid argument. You'll have to have *some* kind of 'parsing' going on in order to interpret the output from gdb that lists the versions of MI, no matter whether it's an MI command or a command-line option or anything else. So why you think one of those ways is terrible and the other is not, on the basis of this requirement, which is in fact the same in both cases anyway, I just don't see. cheers, DaveK -- Can't think of a witty .sigline today....