diff options
author | Doug Evans <dje@google.com> | 2014-12-02 16:40:38 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-12-02 16:40:38 -0800 |
commit | 29f0c3b7b2b4fb46dd5ad29c72ae41a565f5ac60 (patch) | |
tree | e662757950de0395148f81d793eaecd1f6640cbd /gdb/linespec.c | |
parent | 72998fb37a6a4bc684ba86228e81f27c7a7609ca (diff) | |
download | gdb-29f0c3b7b2b4fb46dd5ad29c72ae41a565f5ac60.zip gdb-29f0c3b7b2b4fb46dd5ad29c72ae41a565f5ac60.tar.gz gdb-29f0c3b7b2b4fb46dd5ad29c72ae41a565f5ac60.tar.bz2 |
PR symtab/17602
gdb/ChangeLog:
PR symtab/17602
* linespec.c (iterate_name_matcher): Fix arguments to symbol_name_cmp.
gdb/testsuite/ChangeLog:
PR symtab/17602
* gdb.cp/anon-ns.cc: Move guts of this file to ...
* gdb.cp/anon-ns-2.cc: ... here. New file.
* gdb.cp/anon-ns.exp: Update.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index 82384ca..af958dc 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -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. */ } |