From: Yao Qi <yao@codesourcery.com>
To: Doug Evans <dje@google.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/2] [PR symtab/17602] Fix arguments to symbol_name_cmp
Date: Wed, 26 Nov 2014 09:00:00 -0000 [thread overview]
Message-ID: <87zjbecp5i.fsf@codesourcery.com> (raw)
In-Reply-To: <yjt2mw7ewq2w.fsf@ruffy.mtv.corp.google.com> (Doug Evans's message of "Tue, 25 Nov 2014 20:20:07 -0800")
Doug Evans <dje@google.com> writes:
> - 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. */
Such odd feature is documented in the comments to strcmp_iw:
As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO".
This "feature" is useful when searching for matching C++ function names
(such as if the user types 'break FOO', where FOO is a mangled C++
function).
A question not related to this patch too much, do you consider to move
such c++ specific hack into c++ specific routine la_get_symbol_name_cmp?
--
Yao (齐尧)
next prev parent reply other threads:[~2014-11-26 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 4:20 Doug Evans
2014-11-26 9:00 ` Yao Qi [this message]
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=87zjbecp5i.fsf@codesourcery.com \
--to=yao@codesourcery.com \
--cc=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