From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8364 invoked by alias); 26 Apr 2002 14:57:16 -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 7786 invoked from network); 26 Apr 2002 14:55:52 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by sources.redhat.com with SMTP; 26 Apr 2002 14:55:52 -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 g3QEtps13912 for ; Fri, 26 Apr 2002 07:55:51 -0700 (PDT) Received: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Fri, 26 Apr 2002 07:55:51 -0700 Received: from [64.220.144.98] (vpn-scv-x4-161.apple.com [17.219.194.161]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id g3QEtos28252; Fri, 26 Apr 2002 07:55:50 -0700 (PDT) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Fri, 26 Apr 2002 07:57:00 -0000 Subject: Re: Questions about GDB-MI Interface` From: Jim Ingham To: Eli Zaretskii CC: Message-ID: In-Reply-To: <6480-Fri26Apr2002105439+0300-eliz@is.elta.co.il> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2002-04/txt/msg00460.txt.bz2 On 4/26/02 12:54 AM, "Eli Zaretskii" wrote: >> Date: Thu, 25 Apr 2002 12:23:17 -0700 >> From: Jim Ingham >> >> So, we added an "-mi-interpreter-exec" command that runs commands as if it >> were the console interpreter. The syntax is: >> >> mi-interpreter-exec console ... >> >> These will feed the commands one by one to the execute_command function, AND >> switch the output printer to the CLI printer, so you see console style >> output. Also, while the CLI command is running, it puts in place a series >> of hooks that will report back interesting things to the GUI. > > Isn't it better to have the CLI-style output be followed by the > MI-style output, with some clear separator between them? The front > end could then filter the CLI output to the display, while keeping > the MI output for itself, to sync itself with the debugger. Yes, this is the way that we do it. After all, the intepreter-exec command is an MI command, so I just accumulate the hook results in the result of the MI command, and send them all when it is done. This works great in the async case, because even if you start the inferior you get an immediate "done" for the command, with all the hook results as well. I think this will have to be worked on a bit in the synchronous case, so that you send some out-of-band MI message. Though it has a few of its own problems, the Async stuff makes this sort of thing MUCH easier!! > >>> One thing that I am still confused about, if CLI commands are not supposed >>> to be used in MI mode and MI does not yet have the complete set of GDB >>> functionality, how are we supposed to get the missing functionality? How >>> do other frontends deal with this problem now? >> >> This is a theoretical "not supposed to be used" thing. When needed we grit >> our teeth and call through. Actually, whenever our GUI guy ends up needing >> a CLI command with no MI equivalent, he comes and bugs me, and I usually add >> the MI version... So if you look in our MI code, you will see some more >> functions that we have added, though there are still many more to go... > > Nevertheless, the CLI support is required, I think, because the user > of the GUI should be able to type CLI commands directly. The GUI > front end will never be as flexible as GDB command and scripting > language, even if all the commands are supported in the MI. > -- ++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++= Jim Ingham jingham@apple.com Developer Tools - gdb