From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29379 invoked by alias); 24 Apr 2002 20:01:38 -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 29236 invoked from network); 24 Apr 2002 20:00:20 -0000 Received: from unknown (HELO e31.co.us.ibm.com) (32.97.110.129) by sources.redhat.com with SMTP; 24 Apr 2002 20:00:20 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.194.23]) by e31.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id g3OJxvK8045986; Wed, 24 Apr 2002 16:00:03 -0400 Received: from d25ml02.torolab.ibm.com (d25ml02.torolab.ibm.com [9.26.6.103]) by westrelay02.boulder.ibm.com (8.11.1m3/NCO/VER6.1) with ESMTP id g3OJxj9105702; Wed, 24 Apr 2002 13:59:45 -0600 Subject: Re: Questions about GDB-MI Interface To: Andrew Cagney Cc: gdb@sources.redhat.com Message-ID: From: chanskw@ca.ibm.com Date: Wed, 24 Apr 2002 13:01:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable X-SW-Source: 2002-04/txt/msg00427.txt.bz2 Thank you. I will definitely look at Apple's solution to this problem. Just to clarify things a bit, will GDB continue to support CLI in MI-mode, even after the complete set of mi-commands are implemented? Statements regarding not supporting CLI in MI and its eventual removal are no longer valid? In GDB's User's Guide: This=A0mechanism=A0is=A0provided=A0as=A0an=A0aid=A0to=A0developers=A0o= f=A0GDB/MI clients=A0and=A0not=A0as=A0a=A0reliable=A0interface=A0into=A0the=A0CLI. in mi/mi-main.c, where the CLI command forwarding is done, that says /*=A0A=A0CLI=A0command=A0was=A0read=A0from=A0the=A0input=A0stream=A0*/ /*=A0This=A0will=A0be=A0removed=A0as=A0soon=A0as=A0we=A0have=A0a=A0com= plete=A0set=A0of =A0=A0=A0=A0=A0mi=A0commands=A0*/ Before we decide to go down the path of switching to MI, we need to confirm that CLI-in-MI capability will continue to be available for us to provide a console window for our users. Regards, Samantha Chan =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 Andrew Cagney=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 cc: gdb@sources.redhat.com=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 Subject: Re: Questions about G= DB-MI Interface=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 04/24/2002=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 10:55 AM=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 Please respond=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 to Andrew=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 Cagney=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 > 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.