Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* CLI and GDB/MI documentation patch
@ 2006-05-12  1:16 Bob Rossi
  2006-05-12  7:53 ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: Bob Rossi @ 2006-05-12  1:16 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

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

[-- Attachment #2: gdb.texinfo.diff --]
[-- Type: text/plain, Size: 3882 bytes --]

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  <bob_rossi@cox.net>
+
+	* gdb.texinfo (GDB/MI Compatibility with CLI): Document how CLI
+	commands and GDB/MI interface.
+
 2006-05-05  Jim Blandy  <jimb@codesourcery.com>
 
 	* 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

^ permalink raw reply	[flat|nested] 37+ messages in thread
* Re: CLI and GDB/MI documentation patch
@ 2006-05-12 12:44 Nick Roberts
  2006-05-12 14:19 ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: Nick Roberts @ 2006-05-12 12:44 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches


> I'd agree with Eli that the proposed text sounds a bit like history, but it
> documents some important points:

I'm not sure I like it because:

> - That you can type CLI commands into MI, and this is not longer considered
>   to work just by accident

It was never just by accident, just more of a hack.

> - That typing CLI command has the same effect as -interpreter-exec console

Its not quite the same, the latter goes through mi_cmd_execute but the
former doesn't.

> - That CLI command don't produce async notifications

They don't *currently* produce async notifications but I'm trying to change
that with my branch.

> Those points are important to have documented, IMO.

Putting these things in the manual just makes it harder to change GDB.
I would rather say: "Its there.  Use it at your own risk".  Or at least:


  For the developers convenience CLI commands can be entered directly.
  However this feature may be removed at some stage in the future and
  it is recommended that front ends use the @code{-interpreter exec} command.
  @xref{GDB/MI Miscellaneous Commands}.




-- 
Nick                                           http://www.inet.net.nz/~nickrob


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2006-05-29 19:05 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-12  1:16 CLI and GDB/MI documentation patch Bob Rossi
2006-05-12  7:53 ` Eli Zaretskii
2006-05-12  8:14   ` Vladimir Prus
2006-05-12 11:30     ` Eli Zaretskii
2006-05-12 13:56       ` Bob Rossi
2006-05-12 12:49   ` Daniel Jacobowitz
2006-05-12 12:54     ` Daniel Jacobowitz
2006-05-12 13:58     ` Eli Zaretskii
2006-05-12 14:02       ` Daniel Jacobowitz
2006-05-12 14:10         ` Bob Rossi
2006-05-12 18:32           ` Eli Zaretskii
2006-05-12 18:37         ` Eli Zaretskii
2006-05-12 18:55           ` Daniel Jacobowitz
2006-05-12 19:01             ` Eli Zaretskii
2006-05-12 19:16               ` Daniel Jacobowitz
2006-05-12 19:51                 ` Bob Rossi
2006-05-13  9:28                 ` Eli Zaretskii
2006-05-15 15:50                   ` Daniel Jacobowitz
2006-05-12 20:26               ` PAUL GILLIAM
2006-05-13  8:45                 ` Eli Zaretskii
2006-05-12 12:59   ` Bob Rossi
2006-05-12 14:12     ` Eli Zaretskii
2006-05-12 14:30       ` Bob Rossi
2006-05-12 18:28         ` Eli Zaretskii
2006-05-12 19:19           ` Bob Rossi
2006-05-13  8:09             ` Eli Zaretskii
2006-05-13 11:02               ` Bob Rossi
2006-05-13 14:29                 ` Eli Zaretskii
2006-05-29 19:05           ` Bob Rossi
2006-05-30  7:17             ` Eli Zaretskii
2006-05-12 12:44 Nick Roberts
2006-05-12 14:19 ` Eli Zaretskii
2006-05-12 16:42   ` Bob Rossi
2006-05-12 22:14   ` Nick Roberts
2006-05-12 22:19     ` Bob Rossi
2006-05-13  9:13       ` Nick Roberts
2006-05-13 16:04         ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox