From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21725 invoked by alias); 10 Jul 2003 23:19:47 -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 21707 invoked from network); 10 Jul 2003 23:19:45 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 10 Jul 2003 23:19:45 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id F1A532B6E; Thu, 10 Jul 2003 19:19:45 -0400 (EDT) Message-ID: <3F0DF491.6030605@redhat.com> Date: Thu, 10 Jul 2003 23:19:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Frank Ch. Eigler" Cc: Andrew Cagney , Mark Kettenis , "H. J. Lu" , binutils@sources.redhat.com, GDB Subject: Re: FYI: A new C++ demangler References: <20030710143557.GA25588@lucon.org> <86znjmp0c4.fsf@elgar.kettenis.dyndns.org> <3F0DD802.6090201@redhat.com> Content-Type: multipart/mixed; boundary="------------040906050007040704090803" X-SW-Source: 2003-07/txt/msg00147.txt.bz2 This is a multi-part message in MIME format. --------------040906050007040704090803 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 941 > cagney wrote: > > >> [...] > >> > Could someone fix the old demangler, or write a new one in >> > plain C (or re-write the C++ one in C)? Pretty please? > >> >> Yes. There's no reason for the underlying demangler algorithm to be >> implemented in vanila ISO C 90, and then wrap it for the C++ side. >> [...] > > > You might be accused of dogmatic monolingualism if you don't accept > the notion that some such code may be more naturally expressed in a > higher level language -- that could be one such reason. Another > reason of course is the fact that it is already done and working: > rewriting costs new effort. High level language? I guess that rules out C++ then :-) > (Note that I'm not asserting that the former reason applies strongly > here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to > rely much on the C++ language's extra capabilities.) That was my, and I'm guessing Marks, point. Andrew --------------040906050007040704090803 Content-Type: message/rfc822; name="mailbox-message://ac131313@movemail/fsf/gdb/misc#1138377" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mailbox-message://ac131313@movemail/fsf/gdb/misc#1138377" Content-length: 2971 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: cagney@localhost.redhat.com Received: from localhost (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4CB752B6E for ; Thu, 10 Jul 2003 19:04:49 -0400 (EDT) X-Sieve: cmu-sieve 2.0 Received: from potter.sfbay.redhat.com by localhost with IMAP (fetchmail-6.2.1) for cagney@localhost (single-drop); Thu, 10 Jul 2003 19:04:49 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h6AMwXK18534 for ; Thu, 10 Jul 2003 15:58:33 -0700 Received: from touchme.toronto.redhat.com (touchme.toronto.redhat.com [172.16.14.9]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6AMwVI08246 for ; Thu, 10 Jul 2003 18:58:32 -0400 Received: from toenail.toronto.redhat.com (toenail.toronto.redhat.com [172.16.14.211]) by touchme.toronto.redhat.com (Postfix) with ESMTP id EDFCC8000DB; Thu, 10 Jul 2003 18:58:29 -0400 (EDT) Received: from toenail.toronto.redhat.com (IDENT:fche@localhost [127.0.0.1]) by toenail.toronto.redhat.com (8.12.8/8.12.5) with ESMTP id h6AMwToM032765; Thu, 10 Jul 2003 18:58:29 -0400 Received: (from fche@localhost) by toenail.toronto.redhat.com (8.12.8/8.12.8/Submit) id h6AMwSNF032761; Thu, 10 Jul 2003 18:58:29 -0400 X-Authentication-Warning: toenail.toronto.redhat.com: fche set sender to fche@redhat.com using -f Sender: fche@toenail.toronto.redhat.com To: Andrew Cagney Cc: Mark Kettenis , "H. J. Lu" , binutils@sources.redhat.com, GDB Subject: Re: FYI: A new C++ demangler References: <20030710143557.GA25588@lucon.org> <86znjmp0c4.fsf@elgar.kettenis.dyndns.org> <3F0DD802.6090201@redhat.com> From: fche@redhat.com (Frank Ch. Eigler) Date: 10 Jul 2003 18:58:28 -0400 In-Reply-To: <3F0DD802.6090201@redhat.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-length: 797 cagney wrote: > [...] > > Could someone fix the old demangler, or write a new one in > > plain C (or re-write the C++ one in C)? Pretty please? > > Yes. There's no reason for the underlying demangler algorithm to be > implemented in vanila ISO C 90, and then wrap it for the C++ side. > [...] You might be accused of dogmatic monolingualism if you don't accept the notion that some such code may be more naturally expressed in a higher level language -- that could be one such reason. Another reason of course is the fact that it is already done and working: rewriting costs new effort. (Note that I'm not asserting that the former reason applies strongly here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to rely much on the C++ language's extra capabilities.) - FChE --------------040906050007040704090803--