From: Jim Ingham <jingham@apple.com>
To: <gdb@sources.redhat.com>
Subject: Output of CLI commands under --interpreter=mi
Date: Sun, 21 Apr 2002 11:47:00 -0000 [thread overview]
Message-ID: <B8E85743.9286%jingham@apple.com> (raw)
In-Reply-To: <1019339155.11340.ezmlm@sources.redhat.com>
I don't think you want any CLI command to output with the cli printer.
There are still cli commands that don't have an equivalent mi command, and
these need to come out properly packaged...
We did this for Apple's GDB and use with Project Builder in a slightly
different way. First we made interpreters switchable (so there is a "set
interpreter" command that you can use within gdb). When you are debugging
MI stuff in gdb, this itself is a big bonus! Then I added a command to the
mi: "-interpreter-exec", which allows you to run a command as if it were run
under another interpreter - for instance "-interpreter-exec console list".
For symmetry, we should probably add an "interpreter exec" command to gdb,
but I haven't needed it yet, so I haven't done that...
This will do what you want, I think... This code is all in the gdb on
Apple's OpenSource site if you want to have a look at it. The part of it
that is done works well, we use it all the time.
I have not yet submitted any of this because this bit is only half of a
larger project, which is to include the Tcl interpreter from Insight as a
third interpreter in this setup. Tcl is harder because to do it you also
have to get the event loops coordinated between the two. I think I know
roughly how to do this, but since we don't actually need this for anything
we use gdb for at Apple, I have never had time to complete it.
Jim
> Nick Roberts is working on changing gud.el in Emacs to use the GDB/MI
> interface instead of the current --fullname option. I think it's a
> terrific move, but there's a snag which I believe should be hit by
> almost any front end to GDB: the MI output format.
>
> The problem is that a front end, certainly the GUD, should be able to
> let the user type the normal CLI commands as well. GDB/MI does
> accept CLI input (and should continue doing so), but the output is
> always in MI format, which is unpalatable to humans.
>
> Is it possible to change GDB/MI so that CLI commands get responded with
> the CLI-style output, while MI commands get the MI style output?
>
> TIA
--
++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=
Jim Ingham jingham@apple.com
Developer Tools - gdb
next parent reply other threads:[~2002-04-21 18:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1019339155.11340.ezmlm@sources.redhat.com>
2002-04-21 11:47 ` Jim Ingham [this message]
2002-04-21 22:51 ` Eli Zaretskii
2002-04-24 10:06 ` Jim Ingham
2002-04-24 10:35 ` Eli Zaretskii
2002-04-20 0:02 Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B8E85743.9286%jingham@apple.com \
--to=jingham@apple.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox