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: demangler, java, clinit, $E


mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:

> There are also 127 names which did not demangle at all, even with
> "--format java".  This happens with both old and new demangler.
> These worry me.  I have appended the list.

...

> _ZN3org3xml3sax7helpers11NewInstance6class$$EPN4java4lang6StringE

I checked a patch into the gcc repository to demangle this sort of
name, in which the Java mangler inserted a '$' which is not counted in
the identifier length.

As I said in my message to gcc-patches:

    As a side note, my guess is that adding the '$' is intended to make it
    possible for Java routines to be implemented in C++.  The C++ code
    would simply append a '$' to the keyword, in order to be able to use
    it in C++.  Unfortunately, this won't work, because the C++ mangler
    will count the '$' in the identifier length, unlike the Java mangler.
    So if my guess about the intention is correct, then this is actually a
    bug in the Java mangler.  If the Java mangler is fixed to count the
    '$' in the identifier length, then the patch below will only be needed
    for older code.  It will do no harm for newer code, except that in
    extremely unusual situations it will demangle a symbol name which is
    not actually a mangled name.

Ian


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