From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12388 invoked by alias); 12 May 2006 01:16:56 -0000 Received: (qmail 12380 invoked by uid 22791); 12 May 2006 01:16:55 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao04.cox.net (HELO eastrmmtao04.cox.net) (68.230.240.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 12 May 2006 01:16:53 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao04.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060512011650.JPZM9931.eastrmmtao04.cox.net@localhost.localdomain> for ; Thu, 11 May 2006 21:16:50 -0400 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1FeMHa-0000Ng-S9 for gdb-patches@sources.redhat.com; Thu, 11 May 2006 21:17:30 -0400 Date: Fri, 12 May 2006 01:16:00 -0000 From: Bob Rossi To: gdb-patches@sources.redhat.com Subject: CLI and GDB/MI documentation patch Message-ID: <20060512011730.GA26655@brasko.net> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline User-Agent: Mutt/1.5.9i 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-05/txt/msg00227.txt.bz2 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 176 Hi all, I hope this looks correct. Please let me know otherwise. I think it's an improvement over what is there now, and could save others valuable research time. Bob Rossi --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gdb.texinfo.diff" Content-length: 3882 Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/doc/ChangeLog,v retrieving revision 1.575 diff -u -r1.575 ChangeLog --- ChangeLog 5 May 2006 22:48:14 -0000 1.575 +++ ChangeLog 12 May 2006 01:15:02 -0000 @@ -1,3 +1,8 @@ +2006-05-11 Bob Rossi + + * gdb.texinfo (GDB/MI Compatibility with CLI): Document how CLI + commands and GDB/MI interface. + 2006-05-05 Jim Blandy * gdb.texinfo (General Query Packets): Document conventions for Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.328 diff -u -r1.328 gdb.texinfo --- gdb.texinfo 5 May 2006 22:48:14 -0000 1.328 +++ gdb.texinfo 12 May 2006 01:15:05 -0000 @@ -17377,16 +17377,43 @@ @cindex compatibility, @sc{gdb/mi} and CLI @cindex @sc{gdb/mi}, compatibility with CLI -To help users familiar with @value{GDBN}'s existing CLI interface, @sc{gdb/mi} -accepts existing CLI commands. As specified by the syntax, such -commands can be directly entered into the @sc{gdb/mi} interface and @value{GDBN} will -respond. - -This mechanism is provided as an aid to developers of @sc{gdb/mi} -clients and not as a reliable interface into the CLI. Since the command -is being interpreteted in an environment that assumes @sc{gdb/mi} -behaviour, the exact output of such commands is likely to end up being -an un-supported hybrid of @sc{gdb/mi} and CLI output. +Initially, the @sc{gdb/mi} interface accepted CLI commands to help users +familiar with @value{GDBN}'s existing CLI interface. As specified by the +syntax, such commands can be directly entered into the @sc{gdb/mi} interface +and @value{GDBN} will respond. + +This mechanism was originally provided as an aid to developers of @sc{gdb/mi} +clients and not as a reliable interface into the CLI. The output of these +commands were likely to end up being an un-supported hybrid of @sc{gdb/mi} +and CLI output. This was the case until some time in the @sc{gdb/mi} version +2 protocol. + +Somewhere in the @sc{gdb/mi} version 2 protocol, the command +@code{-interpreter-exec} was added to @value{GDBN}. This provided the +capability to allow @sc{gdb/mi} clients to execute CLI commands in a way +that would provide supported @sc{gdb/mi} output. Since this feature was +so useful, and @sc{gdb/mi} clients historically passed CLI commands directly +into the @sc{gdb/mi} interface, @value{GDBN} was modified to accept CLI +commands directly into the @sc{gdb/mi} interpreter. @value{GDBN} takes +the CLI command, and internally uses the @code{-interpreter-exec} @sc{gdb/mi} +command to ensure that the CLI command the user passed in has supported +@sc{gdb/mi} output. + +So, entering CLI commands directly into the @sc{gdb/mi} interpreter is now +essentially the same as using the @sc{gdb/mi} @code{-interpreter-exec} +command. There may be a small difference in the @sc{gdb/mi} output between +directly typing the CLI command into the @sc{gdb/mi} interpreter or by using +the @code{-interpreter-exec} command, however, both ways should provide +valid @sc{gdb/mi} output. + +One current major difference between entering a CLI command directly into +the @sc{gdb/mi} interpreter and entering the corresponding @sc{gdb/mi} +command into the interpreter is that the CLI command will not have the +asynchronous output that the @sc{gdb/mi} command will have. For instance, +typing @code{run} as a CLI command, you will not get the @code{*stopped} +response that @sc{gdb/mi} will provide if you enter the @code{-exec-run} +command. This is currently considered a limitation of @sc{gdb/mi} that +will be fixed in future versions of @value{GDBN}. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Output Records --d6Gm4EdcadzBjdND--