This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] GDB interpreters
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 21 May 2002 08:08:48 +0300 (IDT)
- Subject: Re: [RFC] GDB interpreters
On Mon, 20 May 2002, Keith Seitz wrote:
> Well, here it is. This is the first really big contribution from Apple.
> The two files below implement several functions for setting, getting,
> defining, and querying interpreters.
Thanks!
> I will be adding documentation for the MI part of the GDB manual
Thanks in advance.
However, it sounds, at least for the commands you included in this
patch, like they should be documented in gdb.texinfo, not in the MI part,
since they are not parts of the MI. Or did I miss something?
> interpreter.c (do I need to edit config/djgpp/fnchange.lst?)
I don't think so: you only need to do that if there is another file in
the same directory whose name will clash with interpreter.c after
truncation to 8+3 limits. In this case, I don't see any other files
whose names would clash.
> void
> _initialize_interpreter (void)
> {
> struct cmd_list_element *c;
>
> c = add_set_cmd ("interpreter", class_support,
> var_string,
> &interpreter_p, "Set the interpreter for gdb.", &setlist);
> set_cmd_sfunc (c, set_interpreter_cmd);
> add_show_from_set (c, &showlist);
>
> add_cmd ("interpreters", class_support,
> list_interpreter_cmd,
> "List the interpreters currently available in gdb.", &infolist);
>
> add_cmd ("interpreter-exec", class_support,
> interpreter_exec_cmd,
> "Execute a command in an interpreter. It takes two arguments:\n\
> The first argument is the name of the interpreter to use.\n\
> The second argument is the command to execute.\n", &cmdlist);
> }
Can we have completion on known interpreter names in these commands? The
default completer function completes on symbols from the inferior, which
is really not a good idea in this case ;-)