Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com, Jim Blandy <jimb@redhat.com>,
	Elena Zannoni <ezannoni@redhat.com>
Subject: Re: [rfa] fix pr java/1039
Date: Fri, 14 Mar 2003 17:26:00 -0000	[thread overview]
Message-ID: <ro1znnxj1vf.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <20030314144703.GA9539@nevyn.them.org>

On Fri, 14 Mar 2003 09:47:03 -0500, Daniel Jacobowitz <drow@mvista.com> 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


  reply	other threads:[~2003-03-14 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-14  5:23 David Carlton
2003-03-14 14:47 ` Daniel Jacobowitz
2003-03-14 17:26   ` David Carlton [this message]
2003-04-14 17:51 ` Elena Zannoni
2003-04-14 19:59   ` David Carlton
2003-04-14 20:01     ` David Carlton
2003-03-14 19:10 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ro1znnxj1vf.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    --cc=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox