From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25486 invoked by alias); 14 Mar 2003 17:26:36 -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 25361 invoked from network); 14 Mar 2003 17:26:35 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 14 Mar 2003 17:26:35 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h2EHQSI19795; Fri, 14 Mar 2003 09:26:28 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, Jim Blandy , Elena Zannoni Subject: Re: [rfa] fix pr java/1039 References: <20030314144703.GA9539@nevyn.them.org> From: David Carlton Date: Fri, 14 Mar 2003 17:26:00 -0000 In-Reply-To: <20030314144703.GA9539@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/msg00328.txt.bz2 On Fri, 14 Mar 2003 09:47:03 -0500, Daniel Jacobowitz said: > On Thu, Mar 13, 2003 at 09:23:03PM -0800, David Carlton wrote: >> ! /* FIXME: carlton/2003-03-13: This is an unfortunate situation. I >> ! don't mind the Java prefix so much: different languages have >> ! different demangling requirements, so it's only natural that we >> ! need to keep language data around in our demangling cache. But >> ! it's not good that the minimal symbol has the wrong demangled name. >> ! Unfortunately, I can't think of any easy solution to that >> ! problem. */ > Hey hey... it occurs to me... it would still not be ideal (memory > waste) but could we look up the minimal symbol and change its demangled > name? It would require: > - changing the interface for setting symbol names > - rehashing the minsyms incrementally > [And do we want to? That's kind of dubious, to have a symbol's name > change.] Hmm. I guess it's true that renaming and rehashing the minsyms would be doable. On the other hand, as you point out, having a symbol's name change is potentially dubious; my guess is that it wouldn't hurt us too much here, but who knows? I think that, for now, we should just leave the situation as-is. (After adding my patch, of course.) After all, for most (all?) situations where minimal symbols are accessed via demangled names, that's only a fallback in case we don't have debug information. And we only have the info to get the demangled name right if we do have debug information, in which case the fallback on minsyms never happens! So, in practice, I don't expect it to hurt Java users too much if Java minsyms have the wrong demangled names. But if either we decide later that it's really important for cleanliness reasons for minsyms to have the right demangled names or if a Java maintainer comes along with evidence that this is important for Java debugging, we could rethink the issue. Incidentally, I think that, with this fix, Java debugging will actually be a little better in 5.4 than in 5.3. (Even setting aside another Java fix that I got in a month or two ago.) Because, now that I think about it, I don't think that 'break Class.method(args)' could have worked before unless the symtab containing Class was loaded: minimal symbols had the wrong demangled name, and partial symbols didn't have any demangled name at all. But now that partial symbols have the right demangled name, that should work much more reliably. I bet this is why jmisc2.exp does a 'ptype jmisc' before doing the break. And, if I'm reading Michael's tables right, this is in fact true: jmisc1.exp does the break before the ptype, and the break there seems to have failed on 5.3, but I'm 99% sure that it passed for me last night when I tried it. David Carlton carlton@math.stanford.edu