From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2446 invoked by alias); 21 Jan 2004 15:19:20 -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 2423 invoked from network); 21 Jan 2004 15:19:19 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 21 Jan 2004 15:19:19 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AjK8S-0000K0-4O; Wed, 21 Jan 2004 10:19:16 -0500 Date: Wed, 21 Jan 2004 15:19:00 -0000 From: Daniel Jacobowitz To: Paul Hilfinger Cc: carlton@kealia.com, gdb-patches@sources.redhat.com Subject: Re: [RFC] Proposed changes in symbol-handling for Ada Message-ID: <20040121151916.GB1131@nevyn.them.org> Mail-Followup-To: Paul Hilfinger , carlton@kealia.com, gdb-patches@sources.redhat.com References: <200311082255.hA8MtJK08216@otisco.McKusick.COM> <20040120101613.F2871F2945@nile.gnat.com> <20040120150101.GB10459@nevyn.them.org> <20040121105510.3E069F281E@nile.gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040121105510.3E069F281E@nile.gnat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00581.txt.bz2 On Wed, Jan 21, 2004 at 05:55:10AM -0500, Paul Hilfinger wrote: > > > Rather than demangling at startup, we ask each mangled name for a base > > identifier. This can be done reasonably efficiently - I hope - I > > haven't performed measurements yet. Then, when we search for a symbol, > > we wildcard for the basename. We demangle everything with that > > basename. If you do a search that doesn't know the basename you > > have to un-lazy all symbols, of course, but I don't think that's much > > of a change. > > Daniel, > > At first blush, this sounds like a great idea (at least until someone > introduces a mangling scheme in which the basename is not a > substring). The basename situation for Ada is essentially the same as you > describe for C++. > > As you may know, the current Ada lookup machinery is separate from (and > partially duplicative of) the usual lookup machinery. There are two > reasons for this: > > 1. We actually WANT to be able to match on base name alone if the user > supplies just a base name. > > 2. We don't include parameter types in mangled names: instead, our > basic lookup routine returns a list of all matches, from which we select > by parameter type or, if that doesn't work, by giving the user a choice. > > 3. Three; there are three reasons: we don't store demangled names. > > So, your proposal takes care of 3. If we could persuade you to > > A. Provide a mode in which you search for the base name (i.e, return > the results of your preliminary sift for base names, skipping the > comparison against full demangled name), and > > B. Provide a mode in which you return ALL matches for a name. > > ... why we could clean up all that nasty duplication in the ada-* files and > join the civilized world. OK. (B) has always been on my todo list; C++ would benefit from it also. (A) will require increasing the size of the symbol (because I had been planning to overlap the basename information with the demangled name information using a union, and store the two sets separately), but I think it's worthwhile. No promises on timeline, since I'm working on several other projects right now, but I'll try to pull this together. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer