From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5064 invoked by alias); 6 Jun 2006 03:16:46 -0000 Received: (qmail 5053 invoked by uid 22791); 6 Jun 2006 03:16:46 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 06 Jun 2006 03:16:43 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FnS3c-0002q6-H8; Mon, 05 Jun 2006 23:16:40 -0400 Date: Tue, 06 Jun 2006 03:16:00 -0000 From: Daniel Jacobowitz To: Nick Roberts , gdb-patches@sources.redhat.com Subject: Re: starting gdb/mi from FE Message-ID: <20060606031640.GA10701@nevyn.them.org> Mail-Followup-To: Nick Roberts , gdb-patches@sources.redhat.com References: <17540.53854.931145.771214@kahikatea.snap.net.nz> <20060606012001.GA7954@nevyn.them.org> <20060606015621.GF10045@brasko.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060606015621.GF10045@brasko.net> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00061.txt.bz2 On Mon, Jun 05, 2006 at 09:56:21PM -0400, Bob Rossi wrote: > > Would -interpreter-list and -interpreter-set do it for you? > > > > I thought there already was a "set interp", but it seems I was > > mistaken. > > Well, I'm not sure. My initial guess is no. Nick, please check this part > out also, especially in regards to your -mi-version command. > > If GDB successfully starts with a -i=miN or just using the CLI and > hoping to switch to MI, then GDB is allowed to execute an arbitrary > number of commands before the FE can issue even a single command. > At least, in the CLI mode this is true if the user has commands in > .gdbinit. > > I really can't afford to recieve a single MI output commadn before I > determine what generated parser I am going to use. So, I'll be stuck > starting GDB N times :( To avoid .gdbinit, start gdb with -nx. If you want, then source .gdbinit or $HOME/.gdbinit yourself. You'll have to duplicate the search for gdbinit files, but it's not as if that's a big deal. As for whether you can parse the response of -interpreter-list, I don't think there's any point in planning for that sort of drastic change to the protocol. We're talking about selecting a version of MI; all versions of MI are supposed to follow more or less the same formats. -- Daniel Jacobowitz CodeSourcery