Return X86_TDESC_MMX in x86_get_ipa_tdesc_idx
[deliverable/binutils-gdb.git] / gdb / interps.c
index db0b31972ea3bcaee19171411edda6d041201e4f..1e59034a5e87b052bdd1007ea0019ca10e5455fb 100644 (file)
@@ -285,7 +285,7 @@ current_interp_set_logging (ui_file_up logfile,
   struct ui_interp_info *ui_interp = get_current_interp_info ();
   struct interp *interp = ui_interp->current_interpreter;
 
-  return interp->set_logging (std::move (logfile), logging_redirect);
+  interp->set_logging (std::move (logfile), logging_redirect);
 }
 
 /* Temporarily overrides the current interpreter.  */
@@ -407,21 +407,14 @@ interpreter_exec_cmd (char *args, int from_tty)
 {
   struct ui_interp_info *ui_interp = get_current_interp_info ();
   struct interp *old_interp, *interp_to_use;
-  char **prules = NULL;
-  char **trule = NULL;
   unsigned int nrules;
   unsigned int i;
-  struct cleanup *cleanup;
 
   if (args == NULL)
     error_no_arg (_("interpreter-exec command"));
 
-  prules = gdb_buildargv (args);
-  cleanup = make_cleanup_freeargv (prules);
-
-  nrules = 0;
-  for (trule = prules; *trule != NULL; trule++)
-    nrules++;
+  gdb_argv prules (args);
+  nrules = prules.count ();
 
   if (nrules < 2)
     error (_("usage: interpreter-exec <interpreter> [ <command> ... ]"));
@@ -446,19 +439,17 @@ interpreter_exec_cmd (char *args, int from_tty)
     }
 
   interp_set (old_interp, 0);
-
-  do_cleanups (cleanup);
 }
 
 /* See interps.h.  */
 
-VEC (char_ptr) *
+void
 interpreter_completer (struct cmd_list_element *ignore,
+                      completion_tracker &tracker,
                       const char *text, const char *word)
 {
   struct interp_factory *interp;
   int textlen;
-  VEC (char_ptr) *matches = NULL;
   int ix;
 
   textlen = strlen (text);
@@ -485,11 +476,9 @@ interpreter_completer (struct cmd_list_element *ignore,
              match[text - word] = '\0';
              strcat (match, interp->name);
            }
-         VEC_safe_push (char_ptr, matches, match);
+         tracker.add_completion (gdb::unique_xmalloc_ptr<char> (match));
        }
     }
-
-  return matches;
 }
 
 struct interp *
This page took 0.027915 seconds and 4 git commands to generate.