debug/10068: Java debug info for class members has wrong DW_AT_name

carlton@math.stanford.edu carlton@math.stanford.edu
Thu Mar 13 23:56:00 GMT 2003


>Number:         10068
>Category:       debug
>Synopsis:       Java debug info for class members has wrong DW_AT_name
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 13 23:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     carlton@math.stanford.edu
>Release:        GCC 3.2
>Organization:
>Environment:
GCC 3.2 (with Red Hat 8.0; I have reason to believe this
bug is still present in mainline, but I haven't checked),
i686-pc-linux-gnu
>Description:
GCJ is generating incorrect DWARF 2 debug info for
members of classes (at least member functions, I
confess I haven't checked for member variables): the
DW_AT_name is "Class.member(args)" instead of just "member".

Hopefully 'break Class.member' will start working again
in GDB after this...
>How-To-Repeat:
Compile this file with gcj -gdwarf-2 -S -dA:

public class jmisc
{
  public static void main (String[] args)
  {
    return;
  }
}

Then look through the debug info to where main is
declared: you'll see

.long .LC2 # DW_AT_name: "jmisc.main(java.lang.String[])"

where it should just say

.long .LC2 # DW_AT_name: "main"

I'm attaching the full assembly file to the PR; lots
of the DW_AT_names are wrong, e.g. the constructors'
names are wrong in a different way. Some GCJ person
should perhaps talk to a G++ person about what the debug
info should look like.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list