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]

[commit, arm] Handle inferior calls via pointers to typedef'ed function types


Hello,

on Thumb, observer.exp tests were failing because the inferior call
logic did not properly set the Thumb bit when passing function pointer
arguments, if the argument used a typedef'ed function type.

Fixed by adding a check_typdef call as appropriate.

Tested on armv7l-linux-gnueabi with no regressions, fixes observer.exp.

Committed to mainline and 7.2 branch.

Bye,
Ulrich


ChangeLog:

	* arm-tdep.c (arm_push_dummy_call): Handle pointers to
	typedef'ed function types correctly.

Index: gdb/arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.304
diff -u -p -r1.304 arm-tdep.c
--- gdb/arm-tdep.c	27 May 2010 19:06:12 -0000	1.304
+++ gdb/arm-tdep.c	14 Aug 2010 00:21:55 -0000
@@ -2144,7 +2144,7 @@ arm_push_dummy_call (struct gdbarch *gdb
 	 the THUMB bit in it.  */
       if (TYPE_CODE_PTR == typecode
 	  && target_type != NULL
-	  && TYPE_CODE_FUNC == TYPE_CODE (target_type))
+	  && TYPE_CODE_FUNC == TYPE_CODE (check_typedef (target_type)))
 	{
 	  CORE_ADDR regval = extract_unsigned_integer (val, len, byte_order);
 	  if (arm_pc_is_thumb (regval))
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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