diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-09-18 15:37:18 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-09-18 15:37:18 +0000 |
commit | dc60453953d816e84c32b10bcc187100ec090206 (patch) | |
tree | 4ebb3131ab59d027361b42aa01174a3911a506a0 /gdb/mips-tdep.c | |
parent | 11350d2a6f73a4a510fa335553e1363857f8b84f (diff) | |
download | gdb-dc60453953d816e84c32b10bcc187100ec090206.zip gdb-dc60453953d816e84c32b10bcc187100ec090206.tar.gz gdb-dc60453953d816e84c32b10bcc187100ec090206.tar.bz2 |
2002-09-18 Andrew Cagney <ac131313@redhat.com>
* valops.c (hand_function_call): Align the initial stack pointer
and STRUCT_ADDR using frame_align. When STRUCT_RETURN and
FRAME_ALIGN_P, use STRUCT_ADDR to obtain the called function's
return value.
* mips-tdep.c (mips_frame_align): New function.
(mips_gdbarch_init): Set frame_align.
* gdbarch.sh (FRAME_ALIGN): New method.
* gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 79b189c..f54f19c 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -2584,6 +2584,14 @@ mips_type_needs_double_align (struct type *type) #define ROUND_DOWN(n,a) ((n) & ~((a)-1)) #define ROUND_UP(n,a) (((n)+(a)-1) & ~((a)-1)) +/* Adjust the address downward (direction of stack growth) so that it + is correctly aligned for a new stack frame. */ +static CORE_ADDR +mips_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr) +{ + return ROUND_DOWN (addr, 16); +} + static CORE_ADDR mips_eabi_push_arguments (int nargs, struct value **args, @@ -5963,6 +5971,7 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words)); set_gdbarch_push_return_address (gdbarch, mips_push_return_address); + set_gdbarch_frame_align (gdbarch, mips_frame_align); set_gdbarch_register_convertible (gdbarch, mips_register_convertible); set_gdbarch_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual); |