public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/29044]  New: Libiberty demangler can not handle new Java mangling.
@ 2006-09-12 21:33 drow at gcc dot gnu dot org
  2006-09-12 21:43 ` [Bug java/29044] " drow at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-09-12 21:33 UTC (permalink / raw)
  To: java-prs

In earlier versions of GCJ this:
public class jmain
{
  public static void main (String[] args)
    {
        return;
    }
}

Was mangled to:
  _ZN5jmain4mainEP6JArrayIPN4java4lang6StringEE

Now it is mangled to:
  _ZN5jmain4mainEJvP6JArrayIPN4java4lang6StringEE

(Including Jv, for a void return type).

This can't be properly demangled (use a current c++filt -s java):
  jmain.main(java.lang.String[])void

I am assuming the mangling change was deliberate.  If so, the demangler should
be updated.


-- 
           Summary: Libiberty demangler can not handle new Java mangling.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
@ 2006-09-12 21:43 ` drow at gcc dot gnu dot org
  2006-09-13  4:03 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-09-12 21:43 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from drow at gcc dot gnu dot org  2006-09-12 21:43 -------
Unless this turns out to be a mangling problem, I assume it's a
libiberty/demangler problem.


-- 

drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
  2006-09-12 21:43 ` [Bug java/29044] " drow at gcc dot gnu dot org
@ 2006-09-13  4:03 ` pinskia at gcc dot gnu dot org
  2006-09-13  6:36 ` ian at airs dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-13  4:03 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-09-13 04:03 -------
(In reply to comment #0)
> I am assuming the mangling change was deliberate.  If so, the demangler should
> be updated.
The mangling change was to fix PR 9861.  Maybe there is note linked from there
about how this should be demangled.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
  2006-09-12 21:43 ` [Bug java/29044] " drow at gcc dot gnu dot org
  2006-09-13  4:03 ` pinskia at gcc dot gnu dot org
@ 2006-09-13  6:36 ` ian at airs dot com
  2006-09-13  6:39 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ian at airs dot com @ 2006-09-13  6:36 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from ian at airs dot com  2006-09-13 06:36 -------
When I run the demangler on
    _ZN5jmain4mainEJvP6JArrayIPN4java4lang6StringEE
I get
    void jmain::main(JArray<java::lang::String*>*)

The relevant patch went in on 2005-12-10 to libiberty/cp-demangle.c.  Can you
confirm that you have that patch?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-09-13  6:36 ` ian at airs dot com
@ 2006-09-13  6:39 ` pinskia at gcc dot gnu dot org
  2006-09-13  7:23 ` ian at airs dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-13  6:39 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-09-13 06:39 -------
(In reply to comment #3)
> When I run the demangler on
>     _ZN5jmain4mainEJvP6JArrayIPN4java4lang6StringEE
> I get
>     void jmain::main(JArray<java::lang::String*>*)
What happens when running it in "Java" mode (note the -s java)?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-09-13  6:39 ` pinskia at gcc dot gnu dot org
@ 2006-09-13  7:23 ` ian at airs dot com
  2006-09-13  9:01 ` aph at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ian at airs dot com @ 2006-09-13  7:23 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from ian at airs dot com  2006-09-13 07:23 -------
OK, with -s java I get
    jmain.main(java.lang.String[])void
I misunderstood Daniel's report.  Sorry about that.

The fact that the function's return type is printed at the end is deliberate. 
This is because -s java sets DMGL_RET_POSTFIX.  This was added as part of the
patch for PR 9861.  I've added Terry to the CC list for this PR; perhaps he can
explain why it works that way.


-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tj at laurenzo dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-09-13  7:23 ` ian at airs dot com
@ 2006-09-13  9:01 ` aph at gcc dot gnu dot org
  2006-09-13 12:31 ` drow at gcc dot gnu dot org
  2006-09-13 12:31 ` drow at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-09-13  9:01 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from aph at gcc dot gnu dot org  2006-09-13 09:01 -------
I don't understand why this bug has been reported.

Are you using an up-to-date libiberty to do the demangling?  When I try c++filt
--format java, I get

  Hello.main(java.lang.String[])void

which is correct.

The exact form of the demangled string was discussed at greeat length in the
thread http://gcc.gnu.org/ml/java-patches/2005-q3/msg00414.html.


-- 

aph at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aph at gcc dot gnu dot org
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-09-13  9:01 ` aph at gcc dot gnu dot org
@ 2006-09-13 12:31 ` drow at gcc dot gnu dot org
  2006-09-13 12:31 ` drow at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-09-13 12:31 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from drow at gcc dot gnu dot org  2006-09-13 12:31 -------
Subject: Re:  Libiberty demangler can not handle new Java mangling.

> I don't understand why this bug has been reported.

The bug was reported because the combination of the mangling change and
the demangler postfix behavior messes up GDB.  You used to be able to
say "break 'jmain.main(java.lang.String[])'" but now that's not found;
you'd have to add the trailing void manually.  As per your message:
  http://gcc.gnu.org/ml/java-patches/2005-q3/msg00434.html

Several affected tests in the GDB testsuite broke.  Of course they're
somewhat provisional tests because there are earlier tests in the same
file which use much more user-friendly forms, that are still not
supported by GDB.  The Java debug support has not gotten much love
lately.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/29044] Libiberty demangler can not handle new Java mangling.
  2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-09-13 12:31 ` drow at gcc dot gnu dot org
@ 2006-09-13 12:31 ` drow at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-09-13 12:31 UTC (permalink / raw)
  To: java-prs



------- Comment #8 from drow at gcc dot gnu dot org  2006-09-13 12:31 -------
Not a bug then.


-- 

drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29044


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-09-13 12:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-12 21:33 [Bug java/29044] New: Libiberty demangler can not handle new Java mangling drow at gcc dot gnu dot org
2006-09-12 21:43 ` [Bug java/29044] " drow at gcc dot gnu dot org
2006-09-13  4:03 ` pinskia at gcc dot gnu dot org
2006-09-13  6:36 ` ian at airs dot com
2006-09-13  6:39 ` pinskia at gcc dot gnu dot org
2006-09-13  7:23 ` ian at airs dot com
2006-09-13  9:01 ` aph at gcc dot gnu dot org
2006-09-13 12:31 ` drow at gcc dot gnu dot org
2006-09-13 12:31 ` drow at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).