Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb <gdb@sources.redhat.com>, Tom Tromey <tromey@redhat.com>,
	Michael Elizabeth Chastain <mec@shout.net>
Subject: Re: break jmisc.main
Date: Thu, 13 Mar 2003 21:16:00 -0000	[thread overview]
Message-ID: <ro165qnklww.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <20030313205639.GA18052@nevyn.them.org>

On Thu, 13 Mar 2003 15:56:39 -0500, Daniel Jacobowitz <drow@mvista.com> 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<TYPE> 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


  parent reply	other threads:[~2003-03-13 21:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-13 20:39 David Carlton
2003-03-13 20:54 ` David Carlton
2003-03-13 20:57 ` Daniel Jacobowitz
2003-03-13 21:07   ` Daniel Jacobowitz
2003-03-13 21:16   ` David Carlton [this message]
2003-03-13 21:22     ` Daniel Jacobowitz
2003-03-13 23:32     ` David Carlton
2003-03-13 23:36       ` Daniel Jacobowitz
2003-03-14  0:17         ` David Carlton
2003-03-14  4:18           ` Daniel Jacobowitz
2003-03-13 23:04   ` Tom Tromey
2003-03-13 22:59 ` Tom Tromey
2003-03-13 23:03   ` Daniel Jacobowitz
2003-03-14 15:09 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=ro165qnklww.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=mec@shout.net \
    --cc=tromey@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