This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange error message from gdb


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]