This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/13743] Debug Info for Java breaks inferior calls
- From: "aph at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2004 14:57:51 -0000
- Subject: [Bug java/13743] Debug Info for Java breaks inferior calls
- References: <20040119171639.13743.aph@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From aph at redhat dot com 2004-02-27 14:57 -------
Subject: New: Debug Info for Java breaks inferior calls
I've been studying gcj's output, and it seems easy to add the vtable
info that C++ generates. I've appended a patch to do that. As far as
I can see, the output is now the same.
As you correctly guessed, in Java, the vtable pointer is always called
"vtable", and it's always at the same offset in the class. I suppose
I could change the name of the vtable pointer to _vptr.<classname> to
make it the same as C++, but I'd rather not if I can avoid it.
gdb can just use "vtable", I presume. Let me know if that doesn't
work.
Is that enough info?
Thanks,
Andrew.
Index: gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.178
diff -c -2 -p -w -r1.178 class.c
*** gcc/java/class.c 26 Feb 2004 15:34:05 -0000 1.178
--- gcc/java/class.c 27 Feb 2004 14:34:56 -0000
*************** set_super_info (int access_flags, tree t
*** 443,446 ****
--- 443,447 ----
= super_binfo;
CLASS_HAS_SUPER (this_class) = 1;
+ TYPE_VFIELD (this_class) = TYPE_VFIELD (super_class);
}
Index: gcc/java/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v
retrieving revision 1.178
diff -c -2 -p -w -r1.178 decl.c
*** gcc/java/decl.c 5 Feb 2004 22:07:32 -0000 1.178
--- gcc/java/decl.c 27 Feb 2004 14:34:56 -0000
*************** java_init_decl_processing (void)
*** 639,642 ****
--- 639,645 ----
PUSH_FIELD (object_type_node, field, "vtable", dtable_ptr_type);
+ DECL_FCONTEXT (field) = object_type_node;
+ TYPE_VFIELD (object_type_node) = field;
+
/* This isn't exactly true, but it is what we have in the source.
There is an unresolved issue here, which is whether the vtable
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13743