* cli/cli-interp.c (cli_interpreter_delete): Delete.
(_initialize_cli_interp): Remove delete_proc.
* interps.h (struct gdb_interpreter_procs): Remove delete_proc.
(interp_delete_ftype): Delete.
(gdb_delete_interpreter): Remove.
* interps.c (gdb_delete_interpreter): Remove.
(gdb_new_interpreter): Don't initialize delete_proc.
2002-11-04 Elena Zannoni <ezannoni@redhat.com>
* mi-interp.c mi_interpreter_delete): Remove.
(_initialize_mi_interp): Remove mi_interpreter_delete.
+2002-11-04 Elena Zannoni <ezannoni@redhat.com>
+
+ * cli/cli-interp.c (cli_interpreter_delete): Delete.
+ (_initialize_cli_interp): Remove delete_proc.
+
+ * interps.h (struct gdb_interpreter_procs): Remove delete_proc.
+ (interp_delete_ftype): Delete.
+ (gdb_delete_interpreter): Remove.
+
+ * interps.c (gdb_delete_interpreter): Remove.
+ (gdb_new_interpreter): Don't initialize delete_proc.
+
2002-11-04 Elena Zannoni <ezannoni@redhat.com>
* interps.c (set_interpreter_cmd): Remove.
static int cli_interpreter_init (void *data);
static int cli_interpreter_resume (void *data);
static int cli_interpreter_suspend (void *data);
-static int cli_interpreter_delete (void *data);
static int cli_interpreter_exec (void *data, char *command_str);
static int cli_interpreter_display_prompt (void *data, char *new_prompt);
return 1;
}
-static int
-cli_interpreter_delete (void *data)
-{
- return 1;
-}
-
static int
cli_interpreter_display_prompt (void *data, char *new_prompt)
{
cli_interpreter_init, /* init_proc */
cli_interpreter_resume, /* resume_proc */
cli_interpreter_suspend, /* suspend_proc */
- cli_interpreter_delete, /* delete_proc */
cli_interpreter_exec, /* exec_proc */
cli_interpreter_display_prompt /* prompt_proc */
};
new_interp->procs.init_proc = procs->init_proc;
new_interp->procs.resume_proc = procs->resume_proc;
new_interp->procs.suspend_proc = procs->suspend_proc;
- new_interp->procs.delete_proc = procs->delete_proc;
new_interp->procs.exec_proc = procs->exec_proc;
new_interp->procs.prompt_proc = procs->prompt_proc;
new_interp->inited = 0;
return 1;
}
-/* Looks for the interpreter INTERP in the interpreter list. If it exists,
- runs the delete_proc, and if this is successful, the INTERP is deleted from
- the interpreter list and the function returns 1. If the delete_proc fails, the
- function returns -1 and the interpreter is NOT removed from the list. If the
- interp is not found, 0 is returned.
-
- This isn't currently used by anything. */
-
-int
-gdb_delete_interpreter (struct gdb_interpreter *interp)
-{
- struct gdb_interpreter *cur_ptr, *prev_ptr;
-
- if (!interpreter_initialized)
- {
- ui_out_message (uiout, 0,
- "You can't delete an interp before you have added one!");
- return -1;
- }
-
- if (interp_list == NULL)
- {
- ui_out_message (uiout, 0, "No interpreters to delete.");
- return -1;
- }
-
- if (interp_list->next == NULL)
- {
- ui_out_message (uiout, 0, "You can't delete gdb's only intepreter.");
- return -1;
- }
-
- for (cur_ptr = interp_list, prev_ptr = NULL;
- cur_ptr != NULL; prev_ptr = cur_ptr, cur_ptr = cur_ptr->next)
- {
- if (cur_ptr == interp)
- {
- /* Can't currently delete the console interpreter... */
- if (strcmp (interp->name, "console") == 0)
- {
- ui_out_message (uiout, 0,
- "You can't delete the console interpreter.");
- return -1;
- }
-
- /* If the interpreter is the current interpreter, switch
- back to the console interpreter */
-
- if (interp == current_interpreter)
- {
- gdb_set_interpreter (gdb_lookup_interpreter ("console"));
- }
-
- /* Don't delete the interpreter if its delete proc fails */
-
- if ((interp->procs.delete_proc != NULL)
- && (!interp->procs.delete_proc (interp->data)))
- return -1;
-
- if (cur_ptr == interp_list)
- interp_list = cur_ptr->next;
- else
- prev_ptr->next = cur_ptr->next;
-
- break;
- }
- }
-
- if (cur_ptr == NULL)
- return 0;
- else
- return 1;
-}
-
/* This sets the current interpreter to be INTERP. If INTERP has not
been initialized, then this will also run the init proc. If the
init proc is successful, return 1, if it fails, set the old
typedef int (*interp_init_ftype) (void *data);
typedef int (*interp_resume_ftype) (void *data);
typedef int (*interp_suspend_ftype) (void *data);
-typedef int (*interp_delete_ftype) (void *data);
typedef int (*interp_prompt_ftype) (void *data, char *new_prompt);
typedef int (*interp_exec_ftype) (void *data, char *command);
interp_init_ftype init_proc;
interp_resume_ftype resume_proc;
interp_suspend_ftype suspend_proc;
- interp_delete_ftype delete_proc;
interp_exec_ftype exec_proc;
interp_prompt_ftype prompt_proc;
};
struct gdb_interpreter_procs *procs);
extern int gdb_add_interpreter (struct gdb_interpreter *interp);
-extern int gdb_delete_interpreter (struct gdb_interpreter *interp);
extern int gdb_set_interpreter (struct gdb_interpreter *interp);
extern struct gdb_interpreter *gdb_lookup_interpreter (char *name);
extern struct gdb_interpreter *gdb_current_interpreter ();
+2002-11-04 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-interp.c mi_interpreter_delete): Remove.
+ (_initialize_mi_interp): Remove mi_interpreter_delete.
+
2002-11-04 Elena Zannoni <ezannoni@redhat.com>
* mi-interp.c (mi_interpreter_do_one_event): Remove.
static int mi_interpreter_init (void *data);
static int mi_interpreter_resume (void *data);
static int mi_interpreter_suspend (void *data);
-static int mi_interpreter_delete (void *data);
static int mi_interpreter_exec (void *data, char *command);
static int mi_interpreter_prompt (void *data, char *new_prompt);
return 1;
}
-static int
-mi_interpreter_delete (void *data)
-{
- return 1;
-}
-
static int
mi_interpreter_exec (void *data, char *command)
{
mi_interpreter_init, /* init_proc */
mi_interpreter_resume, /* resume_proc */
mi_interpreter_suspend, /* suspend_proc */
- mi_interpreter_delete, /* delete_proc */
mi_interpreter_exec, /* exec_proc */
mi_interpreter_prompt /* prompt_proc */
};