diff options
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 7ec19d2..9ebd25e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -6443,7 +6443,6 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker, const char *text, const char *word, enum type_code code) { - int text_len; struct symbol *sym; struct compunit_symtab *s; struct minimal_symbol *msymbol; @@ -6455,10 +6454,7 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker, gdb_assert (code == TYPE_CODE_UNDEF); - text_len = strlen (text); - - lookup_name_info lookup_name (std::string (text, text_len), - name_match_type, true); + lookup_name_info lookup_name (text, name_match_type, true); /* First, look at the partial symtab symbols. */ expand_symtabs_matching (NULL, @@ -6479,8 +6475,7 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker, completion_list_add_name (tracker, MSYMBOL_LANGUAGE (msymbol), MSYMBOL_LINKAGE_NAME (msymbol), - lookup_name, - text, text_len, text, word); + lookup_name, text, word); } /* Search upwards from currently selected frame (so that we can @@ -6496,8 +6491,7 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker, completion_list_add_name (tracker, SYMBOL_LANGUAGE (sym), SYMBOL_LINKAGE_NAME (sym), - lookup_name, - text, text_len, text, word); + lookup_name, text, word); } } @@ -6513,8 +6507,7 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker, completion_list_add_name (tracker, SYMBOL_LANGUAGE (sym), SYMBOL_LINKAGE_NAME (sym), - lookup_name, - text, text_len, text, word); + lookup_name, text, word); } } @@ -6530,8 +6523,7 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker, completion_list_add_name (tracker, SYMBOL_LANGUAGE (sym), SYMBOL_LINKAGE_NAME (sym), - lookup_name, - text, text_len, text, word); + lookup_name, text, word); } } |