aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/interps.c')
-rw-r--r--gdb/interps.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/interps.c b/gdb/interps.c
index fdf1479..163c837 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -319,6 +319,21 @@ interp_lookup (struct ui *ui, const char *name)
return NULL;
}
+/* See interps.h. */
+
+void
+set_top_level_interpreter (const char *name)
+{
+ /* Find it. */
+ struct interp *interp = interp_lookup (current_ui, name);
+
+ if (interp == NULL)
+ error (_("Interpreter `%s' unrecognized"), name);
+ /* Install it. */
+ if (!interp_set (interp, 1))
+ error (_("Interpreter `%s' failed to initialize."), name);
+}
+
/* Returns the current interpreter. */
struct ui_out *
@@ -550,8 +565,9 @@ interpreter_exec_cmd (char *args, int from_tty)
do_cleanups (cleanup);
}
-/* List the possible interpreters which could complete the given text. */
-static VEC (char_ptr) *
+/* See interps.h. */
+
+VEC (char_ptr) *
interpreter_completer (struct cmd_list_element *ignore,
const char *text, const char *word)
{