along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "cli-interp.h"
#include "interps.h"
#include "event-top.h"
#include "ui-out.h"
#include "cli-out.h"
#include "top.h" /* for "execute_command" */
+#include "event-top.h"
#include "infrun.h"
#include "observer.h"
static int
cli_interpreter_resume (void *data)
{
+ struct ui *ui = current_ui;
struct cli_interp *cli = (struct cli_interp *) data;
struct ui_file *stream;
stream = NULL;
}
- gdb_setup_readline ();
+ gdb_setup_readline (1);
+
+ ui->input_handler = command_line_handler;
if (stream != NULL)
cli_out_set_stream (cli->cli_uiout, gdb_stdout);
return result;
}
+int
+cli_interpreter_supports_command_editing (struct interp *interp)
+{
+ return 1;
+}
+
static struct gdb_exception
safe_execute_command (struct ui_out *command_uiout, char *command, int from_tty)
{
cli_interpreter_exec, /* exec_proc */
cli_ui_out, /* ui_out_proc */
NULL, /* set_logging_proc */
- cli_command_loop /* command_loop_proc */
+ cli_command_loop, /* command_loop_proc */
+ cli_interpreter_supports_command_editing, /* supports_command_editing_proc */
};
/* Factory for CLI interpreters. */