]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-11-04 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 4 Nov 2002 22:08:26 +0000 (22:08 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 4 Nov 2002 22:08:26 +0000 (22:08 +0000)
* 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.

gdb/ChangeLog
gdb/cli/cli-interp.c
gdb/interps.c
gdb/interps.h
gdb/mi/ChangeLog
gdb/mi/mi-interp.c

index 728a7cf53511645e09f6918219931bbc313a9b0c..b5a11e539677540a09b200eeb26d809a1dc35268 100644 (file)
@@ -1,3 +1,15 @@
+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.
index d22e228c89375162eeff04f3ac5de191c24841c2..33245cdb9d3590c10c3fc358ed0e889cb030b568 100644 (file)
@@ -30,7 +30,6 @@
 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);
 
@@ -71,12 +70,6 @@ cli_interpreter_suspend (void *data)
   return 1;
 }
 
-static int
-cli_interpreter_delete (void *data)
-{
-  return 1;
-}
-
 static int
 cli_interpreter_display_prompt (void *data, char *new_prompt)
 {
@@ -135,7 +128,6 @@ _initialize_cli_interp (void)
     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 */
   };
index 2137bfd93bc2fa5e87769105d441e420b6ab7a89..727756bfae98ec4c207d3858231b9b91334b9204 100644 (file)
@@ -104,7 +104,6 @@ gdb_new_interpreter (char *name,
   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;
@@ -132,80 +131,6 @@ gdb_add_interpreter (struct gdb_interpreter *interp)
   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
index 9d92c2c8fbcab9d819925bf26f5a8116a4d0ee9c..0d8820c6471293680ae1b8996f3e6bae1e8d197c 100644 (file)
@@ -25,7 +25,6 @@
 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);
 
@@ -37,7 +36,6 @@ struct gdb_interpreter_procs
   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;
 };
@@ -47,7 +45,6 @@ extern struct gdb_interpreter
                        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 ();
index 3854913615d2cc4687a24c4ca38c45d28a187bd8..9765df1fddaeea9e44238f21a3b911b08794011d 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 1cce419b5c7d4a5cda7b0d43f650ec02ae995f88..6146b9c692e5efb7d8e0f2d4652d70bde9dd8bfa 100644 (file)
@@ -47,7 +47,6 @@ struct gdb_interpreter *mi_interp;
 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);
 
@@ -167,12 +166,6 @@ mi_interpreter_suspend (void *data)
   return 1;
 }
 
-static int
-mi_interpreter_delete (void *data)
-{
-  return 1;
-}
-
 static int
 mi_interpreter_exec (void *data, char *command)
 {
@@ -424,7 +417,6 @@ _initialize_mi_interp (void)
       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 */
     };