Index: arm-tdep.c
===================================================================
RCS file: /product/tools/gdb/gdb/arm-tdep.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -c -r1.9 -r1.10
*** arm-tdep.c 20 Sep 2002 17:11:31 -0000 1.9
--- arm-tdep.c 19 Nov 2002 18:33:37 -0000 1.10
***************
*** 1480,1485 ****
--- 1480,1486 ----
}
}
+ sp = (sp + 3) & ~3;
/* Return adjusted stack pointer. */
return sp;
}
The code in valops.c : hand_function_call() that was causing the problem was
this:
/* Reserve space for the return structure to be written on the
stack, if necessary */
if (struct_return)
{
int len = TYPE_LENGTH (value_type);
if (STACK_ALIGN_P ())
/* MVS 11/22/96: I think at least some of this stack_align
code is really broken. Better to let PUSH_ARGUMENTS adjust
the stack in a target-defined manner. */
len = STACK_ALIGN (len);
if (INNER_THAN (1, 2))
{
/* stack grows downward */
sp -= len;
struct_addr = sp;
}
So what I did was to make sure that arm_push_arguments would always return
an aligned stack pointer. I think we can safely agree that
arm_push_arguments should NEVER return an unaligned stack pointer right?
cheers,
Kris