This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB/MI & CLI commands


On Fri, 2003-02-07 at 18:58, Bob Rossi wrote:

> I would like to know if in the official release of mi ( when its basically
> complete ) will accept CLI commands from the client and give back mi
> responses?

No: this behavior exists today ONLY because maintainers know that the MI
command set is incomplete. Once the command set is considered "complete"
(or 9x% complete?), I presume that this "feature" will disappear. (I say
"presume" because I am not a gdb maintainer; nonetheless, I am 99% sure
that it will disappear once the command set is considered [nearly?]
complete.)

> This is important to me since I plan on implementing a console for the
> user to issue CLI commands.

This is what "interpreter-exec" is for (as you suspected).

> What is the difference between MI and -interpreter-exec?

The MI command "-interpreter-exec" is used to execute a command in a
different interpreter. This is how you would implement a console in a
GUI. For example, if I have a console window somewhere, and the user
enters "help<ENTER>", my UI code would call (eventually):
 
-interpreter-exec console "help"

And it would get back the output of the "help" command, encapsulated in
MI syntax, something like:

~"List of classes of commands:\n"
~"\n"
~"aliases -- Aliases of other commands\n"
[etc]

The readline-like capabilities of the UI's command line are considered a
UI-specific feature. For example, in Insight, we do not use readline. We
emulate the most commonly used readline commands, but we do not call any
readline functions at all. IMO, this is no big deal. I've never missed
anything, and I've only ever gotten one patch to add "missing" features.
YMMV.

Hope this helps some,
Keith



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]