This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[RFC] m32c: Set vbit_in_delta for m32c


This patch fixes 50+ failures in gdb.cp/member-ptr.exp for the default
m32c multilib.  The -mcpu=m16c multilib requires, in addition to this patch,
another of my other patches in order to fix the majority of member-ptr.exp
failures.

A description of what this patch is about may be found in the comment
(in the patch) below.

Comments?

	* m32c-tdep.c (m32c_gdbarch_init): Call set_gdbarch_vbit_in_delta().

Index: m32c-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m32c-tdep.c,v
retrieving revision 1.25
diff -u -p -r1.25 m32c-tdep.c
--- m32c-tdep.c	28 Jun 2008 17:29:02 -0000	1.25
+++ m32c-tdep.c	5 Dec 2008 02:18:28 -0000
@@ -2596,6 +2638,16 @@ m32c_gdbarch_init (struct gdbarch_info i
 
   set_gdbarch_virtual_frame_pointer (arch, m32c_virtual_frame_pointer);
 
+  /* m32c function boundary addresses are not necessarily even.
+     Therefore, the `vbit', which indicates a pointer to a virtual
+     member function, is stored in the delta field, rather than as
+     the low bit of a function pointer address.  
+
+     In order to verify this, see the definition of
+     TARGET_PTRMEMFUNC_VBIT_LOCATION in gcc/defaults.h along with the
+     definition of FUNCTION_BOUNDARY in gcc/config/m32c/m32c.h.  */
+  set_gdbarch_vbit_in_delta (arch, 1);
+
   return arch;
 }
 


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