[commit, arm] Handle inferior calls via pointers to typedef'ed function types
Ulrich Weigand
uweigand@de.ibm.com
Sat Aug 14 00:51:00 GMT 2010
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
More information about the Gdb-patches
mailing list