+2002-08-13 Keith Seitz <keiths@redhat.com>
+
+ * interps.c (_initialize_interpreter): Remove ability to set
+ the interpreter. This could really undermine MI clients.
+ * top.c (catcher): Don't worry about interpreter changes.
+
2002-08-12 Keith Seitz <keiths@redhat.com>
* interps.c (_initialize_interpreter): Add completer function
{
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);
- set_cmd_completer (c, interpreter_completer);
- add_show_from_set (c, &showlist);
-
- add_cmd ("interpreters", class_support,
- list_interpreter_cmd,
- "List the interpreters currently available in gdb.", &infolist);
-
c = add_cmd ("interpreter-exec", class_support,
interpreter_exec_cmd,
"Execute a command in an interpreter. It takes two arguments:\n\
char *saved_error_pre_print;
char *saved_quit_pre_print;
struct ui_out *saved_uiout;
- struct gdb_interpreter *saved_interp;
/* Return value from SIGSETJMP(): enum return_reason if error or
quit caught, 0 otherwise. */
/* Override the global ``struct ui_out'' builder. */
saved_uiout = uiout;
- saved_interp = gdb_current_interpreter ();
uiout = func_uiout;
/* Prevent error/quit during FUNC from calling cleanups established
restore_cleanups (saved_cleanup_chain);
- /*
- cases:
- 1. interp1 calls using uiout1
- 2. interp1 calls using uiout1 calls using uiout2
- 3. interp1 calls using uiout1 calls interp2 using uiout2
- 4. more?
- is it enough to note that the interpreter has changed and
- reset saved_uiout
- */
- if (gdb_current_interpreter () == saved_interp)
- uiout = saved_uiout;
- else
- {
- /* We've changed interpreters under this call.
- Reset uiout to the current interpreter's uiout
- and hope for the best. */
- uiout = gdb_interpreter_ui_out (NULL);
- }
+ uiout = saved_uiout;
if (mask & RETURN_MASK_QUIT)
quit_pre_print = saved_quit_pre_print;