* Output of CLI commands under --interpreter=mi
[not found] <1019339155.11340.ezmlm@sources.redhat.com>
@ 2002-04-21 11:47 ` Jim Ingham
2002-04-21 22:51 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Jim Ingham @ 2002-04-21 11:47 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Output of CLI commands under --interpreter=mi
2002-04-21 11:47 ` Output of CLI commands under --interpreter=mi Jim Ingham
@ 2002-04-21 22:51 ` Eli Zaretskii
2002-04-24 10:06 ` Jim Ingham
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2002-04-21 22:51 UTC (permalink / raw)
To: Jim Ingham; +Cc: gdb, nick
[Please don't remove Nick from the CC list: he's not subscribed to the
mailing list.]
On Sun, 21 Apr 2002, Jim Ingham wrote:
> 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".
That'd be fine, too.
> 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.
I think the feature of switching the intepreter is important enough and
stand-alone enough to submit it without waiting for the rest of your
project. If you need a proof that it will be useful for other project,
here came Nick and supplied it ;-)
TIA
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Output of CLI commands under --interpreter=mi
2002-04-21 22:51 ` Eli Zaretskii
@ 2002-04-24 10:06 ` Jim Ingham
2002-04-24 10:35 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Jim Ingham @ 2002-04-24 10:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb, nick
Eli,
Yeah, the problem is that ripping the bits apart is not trivial either.
I will see what I can find time to do later in May. I won't get to it
before then at all. If somebody else wants to take a whack at this,
please at least look at what I did as a starting point, and I will be
happy to answer questions.
Jim
On Sunday, April 21, 2002, at 11:49 PM, Eli Zaretskii wrote:
> [Please don't remove Nick from the CC list: he's not subscribed to the
> mailing list.]
>
> On Sun, 21 Apr 2002, Jim Ingham wrote:
>
>> 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".
>
> That'd be fine, too.
>
>> 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.
>
> I think the feature of switching the intepreter is important enough and
> stand-alone enough to submit it without waiting for the rest of your
> project. If you need a proof that it will be useful for other project,
> here came Nick and supplied it ;-)
>
> TIA
>
--
Jim Ingham jingham@apple.com
Developer Tools - gdb
Apple Computer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Output of CLI commands under --interpreter=mi
@ 2002-04-20 0:02 Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2002-04-20 0:02 UTC (permalink / raw)
To: gdb; +Cc: nick, rms
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-24 17:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1019339155.11340.ezmlm@sources.redhat.com>
2002-04-21 11:47 ` Output of CLI commands under --interpreter=mi Jim Ingham
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox