daily update
[deliverable/binutils-gdb.git] / gdb / value.c
index c5b50c2ec59b8a8717b010a8958ed6a6634d243c..a6bb71865bdc89771fb26e0a0c322c80d81a365f 100644 (file)
@@ -841,7 +841,6 @@ value_actual_type (struct value *value, int resolve_simple_types,
                   int *real_type_found)
 {
   struct value_print_options opts;
-  struct value *target;
   struct type *result;
 
   get_user_print_options (&opts);
@@ -1715,6 +1714,29 @@ lookup_only_internalvar (const char *name)
   return NULL;
 }
 
+/* Complete NAME by comparing it to the names of internal variables.
+   Returns a vector of newly allocated strings, or NULL if no matches
+   were found.  */
+
+VEC (char_ptr) *
+complete_internalvar (const char *name)
+{
+  VEC (char_ptr) *result = NULL;
+  struct internalvar *var;
+  int len;
+
+  len = strlen (name);
+
+  for (var = internalvars; var; var = var->next)
+    if (strncmp (var->name, name, len) == 0)
+      {
+       char *r = xstrdup (var->name);
+
+       VEC_safe_push (char_ptr, result, r);
+      }
+
+  return result;
+}
 
 /* Create an internal variable with name NAME and with a void value.
    NAME should not normally include a dollar sign.  */
This page took 0.023847 seconds and 4 git commands to generate.