From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18600 invoked by alias); 21 Apr 2002 18:47:27 -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 18586 invoked from network); 21 Apr 2002 18:47:17 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by sources.redhat.com with SMTP; 21 Apr 2002 18:47:17 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id g3LIlHs00543 for ; Sun, 21 Apr 2002 11:47:17 -0700 (PDT) Received: from scv2.apple.com (scv2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Sun, 21 Apr 2002 11:47:17 -0700 Received: from [64.220.144.98] (vpn-scv-x1-9.apple.com [17.219.193.9]) by scv2.apple.com (8.11.3/8.11.3) with ESMTP id g3LIlGi13499 for ; Sun, 21 Apr 2002 11:47:16 -0700 (PDT) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Sun, 21 Apr 2002 11:47:00 -0000 Subject: Output of CLI commands under --interpreter=mi From: Jim Ingham To: Message-ID: In-Reply-To: <1019339155.11340.ezmlm@sources.redhat.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2002-04/txt/msg00348.txt.bz2 I don't think you want any CLI command to output with the cli printer. There are still cli commands that don't have an equivalent mi command, and these need to come out properly packaged... We did this for Apple's GDB and use with Project Builder in a slightly different way. First we made interpreters switchable (so there is a "set interpreter" command that you can use within gdb). When you are debugging MI stuff in gdb, this itself is a big bonus! Then I added a command to the mi: "-interpreter-exec", which allows you to run a command as if it were run under another interpreter - for instance "-interpreter-exec console list". For symmetry, we should probably add an "interpreter exec" command to gdb, but I haven't needed it yet, so I haven't done that... This will do what you want, I think... This code is all in the gdb on Apple's OpenSource site if you want to have a look at it. The part of it that is done works well, we use it all the time. I have not yet submitted any of this because this bit is only half of a larger project, which is to include the Tcl interpreter from Insight as a third interpreter in this setup. Tcl is harder because to do it you also have to get the event loops coordinated between the two. I think I know roughly how to do this, but since we don't actually need this for anything we use gdb for at Apple, I have never had time to complete it. Jim > Nick Roberts is working on changing gud.el in Emacs to use the GDB/MI > interface instead of the current --fullname option. I think it's a > terrific move, but there's a snag which I believe should be hit by > almost any front end to GDB: the MI output format. > > The problem is that a front end, certainly the GUD, should be able to > let the user type the normal CLI commands as well. GDB/MI does > accept CLI input (and should continue doing so), but the output is > always in MI format, which is unpalatable to humans. > > Is it possible to change GDB/MI so that CLI commands get responded with > the CLI-style output, while MI commands get the MI style output? > > TIA -- ++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++= Jim Ingham jingham@apple.com Developer Tools - gdb