From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8755 invoked by alias); 17 Jun 2004 02:18:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8740 invoked from network); 17 Jun 2004 02:18:15 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 17 Jun 2004 02:18:15 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BamTm-00068l-Mt for ; Wed, 16 Jun 2004 22:18:14 -0400 Date: Thu, 17 Jun 2004 02:18:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Make class_name_from_physname part of language vector Message-ID: <20040617021814.GA23443@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <40A5583B.7030802@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40A5583B.7030802@redhat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00394.txt.bz2 On Fri, May 14, 2004 at 07:37:31PM -0400, Jeff Johnston wrote: > Index: jv-lang.c > + /* P now points at the `)' at the end of the argument list. Walk > + back to the beginning. */ > + p--; > + depth = 1; > + while (p > name && depth > 0) > + { > + if (*p == '<' || *p == '(') > + depth--; > + else if (*p == '>' || *p == ')') > + depth++; > + p--; > + } > + > + if (p == name) > + return NULL; > + > + while (p > name && *p != '.') > + p--; You've left in a lot of hokery from the C++ support which I'm reasonably confident Java does not need. I don't believe that Java mangled names will ever have templates, or classes nested inside of functions, or multiple argument lists - no depth at all. Also, I'd appreciate it if you called it something other than find_last_component; the C++ version shouldn't have such a generic name either, IMO. Otherwise this looks fine. -- Daniel Jacobowitz