This is the mail archive of the mailing list for the GCC 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: Patch to fix PR9861

Ian Lance Taylor wrote:
Ian Lance Taylor <> writes:

TJ Laurenzo <> writes:

The attached patch corrects PR9861 by including the return type in
mangled names in the C++ and Java compilers for Java class methods. This changes the ABI for Java types but does not make any changes to
C++ programs that do not access Java types.

How is the demangler going to work with this patch? Is there any way for the demangler to determine which names are Java names and which are C++ names? I don't see any obvious way, though I haven't looked that hard.

By the way, considering the demangler is not an unimportant point as
any ambiguity in demangling is an ambiguity that can be happen when
linking C++ and Java code together.  For example, your proposed
mangling for
appears to be
which is the mangled name which will be used for the C++ function
    java::lang::Math::acos(double, double)

Along tenuously similar vein, it is sometimes nice to be able to trick GDB into thinking it *is* C++ (using set lang c++) and referring to things by their C++ names.

I think it would be nice if this were still possible. I think gdb uses the demangler as part of its name completion system, so breaking the demangler will make debugging harder.

David Daney

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