Allow integer immediate for VFP vmov instructions.
[deliverable/binutils-gdb.git] / gdb / interps.c
index b177a8969eba7e0b851963d852b4d6ab5527ef80..61db7f4bdf1724fff5b560482fa7fd0ca6596021 100644 (file)
@@ -1,6 +1,6 @@
 /* Manages interpreters for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+   Copyright (C) 2000-2018 Free Software Foundation, Inc.
 
    Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
 
@@ -439,24 +439,8 @@ interpreter_completer (struct cmd_list_element *ignore,
     {
       if (strncmp (interp.name, text, textlen) == 0)
        {
-         char *match;
-
-         match = (char *) xmalloc (strlen (word) + strlen (interp.name) + 1);
-         if (word == text)
-           strcpy (match, interp.name);
-         else if (word > text)
-           {
-             /* Return some portion of interp->name.  */
-             strcpy (match, interp.name + (word - text));
-           }
-         else
-           {
-             /* Return some of text plus interp->name.  */
-             strncpy (match, word, text - word);
-             match[text - word] = '\0';
-             strcat (match, interp.name);
-           }
-         tracker.add_completion (gdb::unique_xmalloc_ptr<char> (match));
+         tracker.add_completion
+           (make_completion_match_str (interp.name, text, word));
        }
     }
 }
This page took 0.035104 seconds and 4 git commands to generate.