From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 687 invoked by alias); 13 Mar 2003 21:16:13 -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 625 invoked from network); 13 Mar 2003 21:16:11 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 13 Mar 2003 21:16:11 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h2DLFx527429; Thu, 13 Mar 2003 13:15:59 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Jacobowitz Cc: gdb , Tom Tromey , Michael Elizabeth Chastain Subject: Re: break jmisc.main References: <20030313205639.GA18052@nevyn.them.org> From: David Carlton Date: Thu, 13 Mar 2003 21:16:00 -0000 In-Reply-To: <20030313205639.GA18052@nevyn.them.org> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-03/txt/msg00215.txt.bz2 On Thu, 13 Mar 2003 15:56:39 -0500, Daniel Jacobowitz said: > Do you know if this actually broke with my caching patch, or if it was > broken before? The dates that Michael gave for the regression make that quite likely. > I checked, and nowhere in GDB do we ever set the demangling style to > Java. Not that I could find, at least. Right now, symbol_find_demangled_name says: if (gsymbol->language == language_java) { demangled = cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA); if (demangled != NULL) { gsymbol->language = language_java; return demangled; } } There was a similar case in whatever it replaced. > FYI, if you "set demangle-style java" and then "file ./jmisc", this > test passes. I really don't know what we can do about it. My > instincts tell me that we need to either: > - not demangle at all until we know the language; doesn't help for > stabs anyway Is there any way for the minsym readers to guess the language based on a file name, or something like that? > - transform between the Java and C++ demanglings. Converting from the > C++ output to the Java output looks doable, although exceedingly > annoying: > - different names for some types (bool vs boolean, char vs wchar_t) > - All '*' characters are removed > - JArray becomes TYPE[]. > (That's an exhaustive list.) > Going the other way, Java -> C++, would probably be impossible > because of the removed '*'s. Getting that to work well doesn't sound much fun at all to me. If there were a Java maintainer to help, I'd be willing to chip this in, but I'd really rather now. > - Re-demangle if we discover that the symbol is a Java symbol. > Ewwwwww. Ewwww indeed. As a temporary solution, though, we could modify symbol_set_names and friends to use a different cache to store Java demangled names. (Well, use the same cache, but if the current symbol's language is Java then to lookup ##JAVA##demangled_name instead of just demangled_name, or something like that.) The minsyms will still have the wrong names, but that must always have been broken. And it means that Java code won't be able to share memory between names of partial symbols and names of minimal symbols; given the absence of a Java maintainer, I don't care about that in the slightest. I'll think about this, but if there's no easy way to get a good guess at the current language when building minimal symbol tables, I suppose I'll reluctantly take a stab at the temporary solution. David Carlton carlton@math.stanford.edu