Re: [RFC] Interpreters (~final) (fwd)

Keith Seitz
2002-08-27T22:16:54Z

On Tue, 27 Aug 2002, Michael Snyder wrote:

> I'm not sure whose domain this is. /me lacks context.
> What is it we're trying to do here? Provide replacements
> to the CLI interpreter? Lash an extension language into gdb?
> Excuse my ignorance, I haven't followed the conversation
> too closely.

No problem, let me explain what this all does and where it all comes from.

Much of this code comes originally from Jim Ingham at Apple. Like us,
they wanted to address the lack of a command-line pass-through in MI,
i.e., they want a console window like Insight's, one which can execute CLI
commands in the MI interpreter.

Jim's original patch included the ability to do switch interpreters at
runtime. I have (temporarily) removed that, so that it stays static. But
the useful bit is that one can execute a command in another interpreter.

For example, on my interps branch, one can use the "interpreter-exec"
MI command to run a CLI command:

(gdb)
-interpreter-exec console "break main"
~"Breakpoint 3 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
=breakpoint-create,number="3"
^done
(gdb)

Note that the CLI output is properly encapsulated for MI. This all mainly
exists for MI, but it could be used, for example, by Insight, too,
although no one has attempted that.

If there is anything specific you want to know, by all means, ask away.

(Thanks for the look!)
Keith