This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] lookups with natural/linkage names
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Hilfinger at otisco dot mckusick dot com
- Cc: gdb at sources dot redhat dot com, ezannoni at redhat dot com, jimb at redhat dot com, drow at mvista dot com
- Date: 24 May 2003 14:10:42 -0700
- Subject: Re: [rfc] lookups with natural/linkage names
- References: <m3iss12pj5.fsf@papaya.bactrian.org><200305240811.h4O8BJu10644@otisco.McKusick.COM>
On Sat, 24 May 2003 01:11:19 -0700, "Paul N. Hilfinger" <hilfingr@otisco.mckusick.com> said:
>> * Add a function
>> struct symbol *lookup_symbol_linkage (const char *name);
>> that looks up the symbol whose linkage name is NAME. It only looks
>> up global or static symbols (with preference to the former), and
>> only looks up symbols in VAR_DOMAIN; it doesn't apply any
>> language-specific rules. This will, for example, give us a
>> reliable way to find the symbol associated to a minsym, no matter
>> how complicated C++ lookup rules make things.
> What exactly is the reasoning that says that such lookups needn't
> consider local (or rather non-static/global) symbols?
Linkage names are intended to support symbols that the linker knows
about. Those are all global or static, those are all in VAR_DOMAIN.
Basically, the point of this function is to support things like
reliably looking up a symbol associated to a minsym.
Does Ada have exceptions to this? Does Ada somehow mangle names of
local variables or something? If so, why, and how is that represented
in the debug info?
David Carlton
carlton@math.stanford.edu