From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10388 invoked by alias); 4 Oct 2004 13:12:56 -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 10232 invoked from network); 4 Oct 2004 13:12:54 -0000 Received: from unknown (HELO lakermmtao07.cox.net) (68.230.240.32) by sourceware.org with SMTP; 4 Oct 2004 13:12:54 -0000 Received: from white ([68.9.64.121]) by lakermmtao07.cox.net (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with ESMTP id <20041004131253.WQAF21506.lakermmtao07.cox.net@white>; Mon, 4 Oct 2004 09:12:53 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1CESe4-00027B-00; Mon, 04 Oct 2004 09:12:52 -0400 Date: Mon, 04 Oct 2004 13:19:00 -0000 From: Bob Rossi To: Eli Zaretskii , g@white Cc: gdb@sources.redhat.com Subject: Re: probing GDB for MI versions Message-ID: <20041004131252.GA8121@white> Mail-Followup-To: Eli Zaretskii , g@white, gdb@sources.redhat.com References: <20041003170104.GC7030@white> <01c4a9cf$Blat.v2.2.2$5a064020@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c4a9cf$Blat.v2.2.2$5a064020@zahav.net.il> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-10/txt/msg00042.txt.bz2 On Mon, Oct 04, 2004 at 07:01:28AM +0200, Eli Zaretskii wrote: > > Date: Sun, 3 Oct 2004 13:01:04 -0400 > > From: Bob Rossi > > > > gdb --mi-protocols > > MI1 > > MI2 > > MI3 > > > > What does everyone think? With this command, it would be safe to say > > that I could always probe GDB to figure out what version of MI the front > > end should use with the current GDB. > > If at all, I'd prefer this to be an MI command, not a command-line > switch. Yes, I understand, that was my first idea. However, you can see that it is a "catch 22". If you do not know what version of MI to start GDB with, than you can not understand how to parse the output of the MI commands. So, you can not call an MI function to figure out what version to start GDB with. I think it has to be a command line switch, although I'm open to suggestions. The more I think about it, we could change the command to be something like --list-interfaces and it could look something like, gdb --list-interfaces annotate1 annotate2 annotate3 mi1 mi2 mi3 > It won't solve this problem, of course: > > > The only problem with this approach is that it obviously won't work for > > GDB's before this command was implemented. However, in that case, the > > user can either assume MI1 (if that's the only publically released > > version) or they can try MI2. > > To solve that, a front end that is willing to support old versions of > GDB will need to have a database of old GDB versions and the MI > versions they supported. I don't see what the GDB versions have to do with, am I missing something? I am only interested in the MI versions. Thanks, Bob Rossi