From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] [PR symtab/17602] Fix arguments to symbol_name_cmp
Date: Wed, 26 Nov 2014 04:20:00 -0000 [thread overview]
Message-ID: <yjt2mw7ewq2w.fsf@ruffy.mtv.corp.google.com> (raw)
Hi.
This patch fixes pr 17602, the arguments to symbol_name_cmp are
reversed, as explained in the comment in this patch.
Regression tested on amd64-linux.
2014-11-25 Doug Evans <dje@google.com>
PR symtab/17602
* linespec.c (iterate_name_matcher): Fix arguments to symbol_name_cmp.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 5325702..35b0205 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. */
}
next reply other threads:[~2014-11-26 4:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 4:20 Doug Evans [this message]
2014-11-26 9:00 ` Yao Qi
2014-12-04 16:02 ` Doug Evans
2014-12-04 11:48 ` Andreas Arnez
2014-12-04 15:57 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yjt2mw7ewq2w.fsf@ruffy.mtv.corp.google.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox