From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15982 invoked by alias); 24 Apr 2002 14:55:15 -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 15947 invoked from network); 24 Apr 2002 14:55:12 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 24 Apr 2002 14:55:12 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 5E8A73D26; Wed, 24 Apr 2002 10:55:07 -0400 (EDT) Message-ID: <3CC6C74B.2030401@cygnus.com> Date: Wed, 24 Apr 2002 07:55:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: chanskw@ca.ibm.com Cc: gdb@sources.redhat.com Subject: Re: Questions about GDB-MI Interface References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00418.txt.bz2 > 2. On the same topic, when we use CLI-in-MI we see that we sometimes get > pure CLI output, sometimes pure MI output, and sometimes a mixture of > both. The Users Guide hints that this is normal, when it says to expect > an "unsupported hybrid of GDB/MI and CLI output", but we don't know if we > can provide a reliable and high-fidelity console window under these > conditions. Do you have any suggestions how we should proceed, or how > other front ends have dealt with this? > > Ideally, we'd like to let our users continue to use the CLI, and see > CLI-style output, while our GUI simultaneously interacts with gdb using MI. > So we'd like to change the definition of MI to support this, and have all > commands change their output style based on whether they are invoked via > the CLI or MI. > > We found one of the recent discussions from GDB Mailing List addressing > this specific problem: > > http://sources.redhat.com/ml/gdb/2002-04/msg00348.html > > Apple has implemented a solution to allow front-ends to switch GDB's > interpreter between MI and CLI. This solution will allow frontend to relay > commands entered by user to GDB, and responses coming back from GDB will be > in CLI-style. CLI-style responses can be sent back to our console window > and will be meaningful to users. Can I encourage you to look at Apple's contributed code. See: ftp://sources.redhat.com/pub/gdb/contrib/apple/ As was noted by JimI, they came up with a way to address the problem. You could even consider extracting the relevant changes from the patch. However, before doing this, you would need to establish a GDB copyright assignment/disclaimer. With regard to annotations and using GDB's CLI directly, I really would discourage this. They are both largely untested(1) and make your code reliant on the behavour of the underlying CLI (something you can assume will change). Andrew (1) Some what ironically, it was the MI developers that added the annotation tests to GDB.