forked from Imagelibrary/binutils-gdb
Display the ">" prompt in interactive mode while reading canned
commands, even when the current interpreter is MI. interps.c (interp_set_temp): New function. interps.h (interp_set_temp): Add prototype. cli/cli-script.c (restore_interp): New cleanup function. (read_command_lines): Temporarily override the current interpreter with CLI and arrange for restoring the original one.
This commit is contained in:
@@ -253,6 +253,18 @@ interp_ui_out (struct interp *interp)
|
||||
return current_interpreter->procs->ui_out_proc (current_interpreter);
|
||||
}
|
||||
|
||||
/* Temporarily overrides the current interpreter. */
|
||||
struct interp *
|
||||
interp_set_temp (const char *name)
|
||||
{
|
||||
struct interp *interp = interp_lookup (name);
|
||||
struct interp *old_interp = current_interpreter;
|
||||
|
||||
if (interp)
|
||||
current_interpreter = interp;
|
||||
return old_interp;
|
||||
}
|
||||
|
||||
/* Returns the interpreter's cookie. */
|
||||
|
||||
void *
|
||||
|
||||
Reference in New Issue
Block a user