This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/43521] New: java: "this" pointer not marked with DW_AT_artificial
- From: "keiths at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2010 17:22:24 -0000
- Subject: [Bug debug/43521] New: java: "this" pointer not marked with DW_AT_artificial
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat > j.java << EOF
> class j
> {
> public j () { }
>
> public static void main (String[] args)
> {
> j a = new j ();
> System.out.println ("a = " + a);
> }
> }
> EOF
$ gcj -g j.java -o j --main=j
If you look at the debug info generated for the constructor, gcj gives us:
<2><11a>: Abbrev Number: 4 (DW_TAG_subprogram)
<11b> DW_AT_external : 1
<11c> DW_AT_name : (indirect string, offset: 0xe9): <init>
<120> DW_AT_decl_file : 1
<121> DW_AT_decl_line : 3
<122> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x11b):
_ZN1jC1Ev
<126> DW_AT_declaration : 1
<127> DW_AT_sibling : <0x132>
<3><12b>: Abbrev Number: 5 (DW_TAG_formal_parameter)
<12c> DW_AT_type : <0x14c>
<130> DW_AT_artificial : 1
Later gcj emits a DIE with location information:
<1><15e>: Abbrev Number: 11 (DW_TAG_subprogram)
<15f> DW_AT_specification: <0x11a>
<163> DW_AT_low_pc : 0x8048a64
<167> DW_AT_high_pc : 0x8048a7d
<16b> DW_AT_frame_base : 0x38 (location list)
<16f> DW_AT_sibling : <0x194>
<2><173>: Abbrev Number: 12 (DW_TAG_formal_parameter)
<174> DW_AT_name : (indirect string, offset: 0xd1): this
<178> DW_AT_decl_file : 1
<179> DW_AT_decl_line : 3
<17a> DW_AT_type : <0x14c>
<17e> DW_AT_location : 2 byte block: 91 0 (DW_OP_fbreg: 0)
Everything is good until the formal parameter "this": it is suddenly not marked
with DW_AT_artificial.
The same thing happens with class methods, too.
--
Summary: java: "this" pointer not marked with DW_AT_artificial
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: keiths at redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43521