This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Strange error message from gdb
- From: Andrew Haley <aph at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Cc: Daniel Jacobowitz <drow at false dot org>
- Date: Wed, 19 Dec 2007 20:27:13 +0000
- Subject: Re: Strange error message from gdb
- References: <18281.21294.238761.442229@zebedee.pink> <20071219172943.GA5939@caradoc.them.org> <18281.23234.151870.816362@zebedee.pink> <20071219185517.GA10986@caradoc.them.org> <18281.27225.249982.220171@zebedee.pink> <20071219190450.GA11655@caradoc.them.org>
At the present time gdb can't cope with interface types, so it doesn't
make any sense for gcj to emit them in debuginfo. This small change
means we can debug code that contains interface types.
Longer term, we should perhaps fix gdb.
Andrew.
2007-12-19 Andrew Haley <aph@redhat.com>
* lang.c (java_classify_record): Don't return RECORD_IS_INTERFACE.
Index: java/lang.c
===================================================================
--- java/lang.c (revision 131034)
+++ java/lang.c (working copy)
@@ -965,8 +965,12 @@
if (! CLASS_P (type))
return RECORD_IS_STRUCT;
- if (CLASS_INTERFACE (TYPE_NAME (type)))
- return RECORD_IS_INTERFACE;
+ /* All versions of gdb at the time of writing have no support for
+ DW_TAG_interface_type, so there's no point in using it. At some
+ time in the future it might be worth revisiting this
+ decision. */
+/* if (CLASS_INTERFACE (TYPE_NAME (type))) */
+/* return RECORD_IS_INTERFACE; */
return RECORD_IS_CLASS;
}
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903