From: Nathan Sidwell Date: Thu, 13 Jul 2006 09:30:46 +0000 (+0000) Subject: * m68k-tdep.c (m68k_frame_align): New. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bb47d95dd8931c8f6ecc7ddf481cfbcd72b4fba;p=binutils-gdb.git * m68k-tdep.c (m68k_frame_align): New. (m68k_gdbarch_init): Set frame_align here. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 54240582857..9392632e7a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-07-13 Nathan Sidwell + + * m68k-tdep.c (m68k_frame_align): New. + (m68k_gdbarch_init): Set frame_align here. + 2006-07-13 Denis PILAT * interps.c (interpreter_completer): Allocate one more item to the diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 1ddd652a917..168eef1cb32 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -413,6 +413,16 @@ m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type, } +/* Always align the frame to a 4-byte boundary. This is required on + coldfire and harmless on the rest. */ + +static CORE_ADDR +m68k_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) +{ + /* Align the stack to four bytes. */ + return sp & ~3; +} + static CORE_ADDR m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, @@ -1155,6 +1165,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Stack grows down. */ set_gdbarch_inner_than (gdbarch, core_addr_lessthan); + set_gdbarch_frame_align (gdbarch, m68k_frame_align); set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_decr_pc_after_break (gdbarch, 2);