From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6018 invoked by alias); 20 Dec 2003 15:55:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6011 invoked from network); 20 Dec 2003 15:55:11 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 20 Dec 2003 15:55:11 -0000 Received: (qmail 22824 invoked by uid 10); 20 Dec 2003 15:55:10 -0000 Received: (qmail 27719 invoked by uid 500); 20 Dec 2003 15:55:04 -0000 From: Ian Lance Taylor To: mec.gnu@mindspring.com (Michael Elizabeth Chastain) Cc: gdb@sources.redhat.com, tromey@redhat.com Subject: Re: demangler, java, clinit, $E References: <20031217002907.3CA854B375@berman.michael-chastain.com> Date: Sat, 20 Dec 2003 15:55:00 -0000 In-Reply-To: <20031217002907.3CA854B375@berman.michael-chastain.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00253.txt.bz2 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