]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/linespec.c
PR symtab/17602
[thirdparty/binutils-gdb.git] / gdb / linespec.c
index 82384cab6207efb62d632abf48741e74beea6e3d..af958dc9f3719830321186e3a26e90670477660a 100644 (file)
@@ -982,7 +982,12 @@ iterate_name_matcher (const char *name, void *d)
 {
   const struct symbol_matcher_data *data = d;
 
-  if (data->symbol_name_cmp (name, data->lookup_name) == 0)
+  /* The order of arguments we pass to symbol_name_cmp is important as
+     strcmp_iw, a typical value for symbol_name_cmp, only performs special
+     processing of '(' to remove overload info on the first argument and not
+     the second.  The first argument is what the user provided, the second
+     argument is what came from partial syms / .gdb_index.  */
+  if (data->symbol_name_cmp (data->lookup_name, name) == 0)
     return 1; /* Expand this symbol's symbol table.  */
   return 0; /* Skip this symbol.  */
 }