This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] SYMBOL_NATURAL_NAME, SYMBOL_LINKAGE_NAME


On Mon, 24 Feb 2003 22:03:03 -0500, Elena Zannoni <ezannoni at redhat dot com> said:
> David Carlton writes:

>> This patch adds macros SYMBOL_NATURAL_NAME and SYMBOL_LINKAGE_NAME to
>> symtab.h.  The former returns what the programmer thinks a symbol is
>> called; the latter returns what the linker thinks a symbol is called.
>> In C, these are the same thing; in C++, the former is the demangled
>> name, and the latter is the mangled name.

> Good move.  A couple of things.  I think the sentence "the
> programmer thinks a symbol is called" is a bit vague.  Maybe
> something like the 'name of a symbol as it appears in the high level
> programming language', or 'name of a symbol as it was declared in
> the high level program' or something like that?

Fair enough.  Maybe "the name of the symbol as referred to in the
source code"?

> Second thing, more important. I think that if we are going to try to
> switch away from using SYMBOL_NAME, we should be renaming it to
> DEPRECATED_SYMBOL_NAME, because this will be more effective than
> putting a 'suggested use' in a comment.  It's a bit more of slog work,
> but we could then even ARI the DEPRECATED_SYMBOL_NAME.

> what do you think?

Absolutely.  That'll help other people conform, and encourage me to
take the time to audit uses of the name sooner rather than later.

David Carlton
carlton at math dot stanford dot edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]