This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 3/3] Move logic out of symbol_find_demangled_name
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 7 Jun 2016 15:03:36 +0100
- Subject: Re: [RFA 3/3] Move logic out of symbol_find_demangled_name
- Authentication-results: sourceware.org; auth=none
- References: <1465051760-25840-1-git-send-email-tom at tromey dot com> <1465051760-25840-4-git-send-email-tom at tromey dot com> <86mvmywgj1 dot fsf at gmail dot com>
On 06/06/2016 03:14 PM, Yao Qi wrote:
> Tom Tromey <tom@tromey.com> writes:
>
>> > I'm not especially fond of the new name, "la_demangle_for_symbol".
>> >
> How about "la_sniff_by_symbol"? IMO, symbol_find_demangled_name does
> two things, set the language of symbol, and get the demangled name.
> It is quite similar to frame unwinder sniffer and frame unwinding.
>
I have to admit that it took me a bit to understand what the "by" meant,
but I think it intends to convey:
"sniff the symbol's language from the symbol's mangled name".
So s/by symbol/from symbol/ would be better, IMHO.
symbol_find_demangled_name says:
/* (...) attempt to find any demangling algorithm that works and
then set the language appropriately. The returned name is allocated
by the demangler and should be xfree'd. */
So IMHO, something like "la_sniff_from_mangled_name" would be
even clearer.
BTW, what do we do with the resulting demangled name? Is
there some sort of guideline for options to pass to the demangler?
Some sort of output that we're aiming for?
Thanks,
Pedro Alves