demangler, java, clinit, $E
Tom Tromey
tromey@redhat.com
Wed Dec 17 16:17:00 GMT 2003
>>>>> "Ian" == Ian Lance Taylor <ian@wasabisystems.com> writes:
Ian> For some reason the Java mangler emits a '$' character after a member
Ian> name, if the name happens to be a C++ keyword with optional trailing
Ian> '$' characters. I don't know why it bothers to do this.
It's a weird quoting scheme to achieve some kind of CNI compatibility.
When generating a C++ header from a .class file, we might see a method
or field with the same name as a C++ keyword. So we add a "$". But
then this is ambiguous, so if we see keyword + sequence of "$", we add
one more "$". This scheme doesn't work for static fields or
methods... some parts of CNI are still half-baked.
Tom
More information about the Gdb
mailing list