This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] Add SYMBOL_SET_LINKAGE_NAME
- From: David Carlton <carlton at kealia dot com>
- To: Paul Hilfinger <hilfingr at EECS dot Berkeley dot EDU>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 17 Feb 2004 17:26:54 -0800
- Subject: Re: [rfa] Add SYMBOL_SET_LINKAGE_NAME
- References: <200402180049.i1I0n4HR018124@tully.CS.Berkeley.EDU>
On Tue, 17 Feb 2004 16:49:04 -0800, Paul Hilfinger <hilfingr@EECS.Berkeley.EDU> said:
>> When we're talking about types, however, linkage names don't make much
>> sense, only natural names.
> Oh, I DO so hate to rock the boat, but this statement is not true in
> the case of Ada, in which the natural name of a type is not how it's
> known to the linker.
Can you clarify this? Because:
> I don't see why "linkage names don't make much sense" anyway: the name
> of a (C/C++) type is, indeed, what the linker sees.
I don't see this as being true for C/C++. The linker sees the names
of functions and variables, but it doesn't see the names of types.
There aren't any minimal symbols associated to types. There are
minimal symbols associated to methods of classes, static variables of
classes, and other stuff (virtual function tables, at least), but no
minimal symbols associated to the the types themselves.
I can see how you could take the name of a type and mangle it, and I
can imagine that doing so might be useful for Ada (and perhaps even
for C++?), given the picture that you've been painting. But I
wouldn't call that a linkage name, because there's nothing in the
object file which has that name.
So is the picture different for Ada, or have I not been being clear
with the distinction of linkage name vs. mangled name? (Or am I
missing something even in the C/C++ case, for that matter?)
David Carlton
carlton@kealia.com