82 this->name = xstrdup (
name);
115 if (strcmp (f.name,
name) == 0)
118 _(
"interpreter factory already registered: \"%s\"\n"),
160 if (old_interp != NULL)
221 if (
name == NULL || strlen (
name) == 0)
230 if (strcmp (factory.name,
name) == 0)
249 error (
_(
"Interpreter `%s' unrecognized"),
name);
358 struct interp *save_command_interp;
394 struct interp *old_interp, *interp_to_use;
402 nrules = prules.
count ();
405 error (
_(
"usage: interpreter-exec <interpreter> [ <command> ... ]"));
410 if (interp_to_use == NULL)
411 error (
_(
"Could not find interpreter \"%s\"."), prules[0]);
415 for (i = 1; i < nrules; i++)
422 error (
_(
"error in command: \"%s\"."), prules[i]);
434 const char *text,
const char *word)
436 int textlen = strlen (text);
440 if (strncmp (
interp.
name, text, textlen) == 0)
474 Execute a command in an interpreter. It takes two arguments:\n\ 475 The first argument is the name of the interpreter to use.\n\ 476 The second argument is the command to execute.\n"), &
cmdlist);
void error_no_arg(const char *why)
virtual void init(bool top_level)
std::unique_ptr< ui_file > ui_file_up
int(* deprecated_query_hook)(const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1
void internal_error(const char *file, int line, const char *fmt,...)
struct ui_out * interp_ui_out(struct interp *interp)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void interpreter_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
void(* deprecated_context_hook)(int)
void(* deprecated_print_frame_info_listing_hook)(struct symtab *s, int line, int stopline, int noerror)
void _initialize_interpreter(void)
struct cmd_list_element * cmdlist
ptid_t(* deprecated_target_wait_hook)(ptid_t ptid, struct target_waitstatus *status, int options)
static struct ui_interp_info * get_current_interp_info(void)
struct interp * current_interpreter(void)
void interp_pre_command_loop(struct interp *interp)
static std::vector< interp_factory > interpreter_factories
static int logging_redirect
struct interp * set_interp(const char *name)
int interp_supports_command_editing(struct interp *interp)
int(*) void(* deprecated_warning_hook)(const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
void interp_factory_register(const char *name, interp_factory_func func)
void clear_interpreter_hooks(void)
virtual ui_out * interp_ui_out()=0
static void interp_set(struct interp *interp, bool top_level)
virtual void set_logging(ui_file_up logfile, bool logging_redirect)=0
struct interp * top_level_interpreter
virtual void pre_command_loop()
static void interpreter_exec_cmd(const char *args, int from_tty)
void(* deprecated_error_begin_hook)(void)
void(* deprecated_readline_begin_hook)(const char *,...) ATTRIBUTE_FPTR_PRINTF_1
virtual gdb_exception exec(const char *command)=0
int(*) void(*) void(* deprecated_interactive_hook)(void)
const char * interp_name(struct interp *interp)
void interp_add(struct ui *ui, struct interp *interp)
struct interp * command_interpreter
static struct interp * interp_lookup_existing(struct ui *ui, const char *name)
struct gdb_exception interp_exec(struct interp *interp, const char *command_str)
void(* deprecated_readline_end_hook)(void)
struct ui_interp_info * interp_info
gdb::unique_xmalloc_ptr< char > make_completion_match_str(const char *match_name, const char *text, const char *word)
struct interp * current_interpreter
static struct ui_interp_info * get_interp_info(struct ui *ui)
void set_top_level_interpreter(const char *name)
struct interp * command_interp(void)
void add_completion(gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd=NULL, const char *text=NULL, const char *word=NULL)
virtual bool supports_command_editing()
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
struct interp * top_level_interpreter(void)
interp_factory(const char *name_, interp_factory_func func_)
int current_interp_named_p(const char *interp_name)
struct interp * interp_list
void error(const char *fmt,...)
struct interp *(* interp_factory_func)(const char *name)
void current_interp_set_logging(ui_file_up logfile, bool logging_redirect)
enum return_reason reason
void(* deprecated_call_command_hook)(struct cmd_list_element *c, const char *cmd, int from_tty)
struct interp * interp_lookup(struct ui *ui, const char *name)
char *(* deprecated_readline_hook)(const char *)