This is the mail archive of the gdb@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: [rfc] lookups with natural/linkage names


On Mon, 26 May 2003 03:42:59 -0700, "Paul N. Hilfinger" <hilfingr@otisco.mckusick.com> said:

> Are nested function names ever mangled?  We seldom consider nested
> functions, because they don't occur in official C/C++, but they do
> occur in GCC's extensions (and in Pascal and Ada).  On IRIX, using
> Dwarf-2, nested function names do NOT appear in the minimal symbols
> (whereas on Linux, they do).  I hope you see why this makes me
> slightly nervous.

Eep.  I hadn't thought of that case.

Still, I don't see why there would be a particular reason to mangle
names of nested functions.  The point of mangling is to communicate
rich information about an object over an information channel whose
format is tightly constrained.  But for local objects, you can use the
debug info as the information channel, and its format is very rich.
So information about, say, types of arguments to nested functions can
(and should, in my reading of DWARF 2, though I admit that the
standard is annoyingly vague about names) be transmitted in other
parts of the debug info, not in the name attribute.

Having said that, there's still the question of whether or not GDB
currently depends on getting information from the mangled name.  And
the answer is that, currently, it does that to an extent that is
probably unhealthy.

David Carlton
carlton@math.stanford.edu


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