From 19f5934377cdd949da85bea862750e48f50aafde Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 1 Aug 2003 19:52:49 +0000 Subject: [PATCH] 2003-08-01 Michael Snyder * sh-tdep.c (sh_frame_align): New gdbarch method. (sh_gdbarch_init): Set up frame_align method. --- gdb/ChangeLog | 5 +++++ gdb/sh-tdep.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 536f34f5e96..6964774a1cd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-08-01 Michael Snyder + + * sh-tdep.c (sh_frame_align): New gdbarch method. + (sh_gdbarch_init): Set up frame_align method. + 2003-07-31 Michael Snyder * value.h, values.c, infcall.c, infcmd.c: Revert 07-30 change, diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 36fa9d09100..dc3e99228d2 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2028,6 +2028,12 @@ sh64_pop_frame (void) flush_cached_frames (); } +static CORE_ADDR +sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) +{ + return sp & ~3; +} + /* Function: push_arguments Setup the function arguments for calling a function in the inferior. @@ -2090,7 +2096,7 @@ sh_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); /* first force sp to a 4-byte alignment */ - sp = sp & ~3; + sp = sh_frame_align (gdbarch, sp); /* The "struct return pointer" pseudo-argument has its own dedicated register */ @@ -4356,6 +4362,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame); set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call); + set_gdbarch_frame_align (gdbarch, sh_frame_align); switch (info.bfd_arch_info->mach) { -- 2.30.2