From: Andrew Cagney <ac131313@redhat.com>
To: Richard.Earnshaw@arm.com, Kris Warkentin <kewarken@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: [rfa?] Add frame_align(); Was: ARM stack alignment on hand called functions
Date: Wed, 27 Nov 2002 10:43:00 -0000 [thread overview]
Message-ID: <3DE51241.9040104@redhat.com> (raw)
In-Reply-To: <200211270917.gAR9HNE29771@pc960.cambridge.arm.com>
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
[mailing list changed]
The attached implements the theory. Doesn't show any regressions. Then
again, I don't know if it fixes the reported problem either :-/
Kris?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1076 bytes --]
2002-11-27 Andrew Cagney <cagney@redhat.com>
* arm-tdep.c (arm_frame_align): New function.
(arm_gdbarch_init): Set frame_align.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.78
diff -u -r1.78 arm-tdep.c
--- arm-tdep.c 24 Nov 2002 18:23:37 -0000 1.78
+++ arm-tdep.c 27 Nov 2002 18:26:44 -0000
@@ -1279,6 +1279,15 @@
return sp;
}
+/* Ensure that the ARM's stack pointer has the correct alignment for a
+ new frame. */
+static CORE_ADDR
+arm_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
+{
+ return (addr & -16);
+}
+
+
/* Push an empty stack frame, to record the current PC, etc. */
static void
@@ -2857,6 +2866,7 @@
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frame_init_saved_regs (gdbarch, arm_frame_init_saved_regs);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
+ set_gdbarch_frame_align (gdbarch, arm_frame_align);
set_gdbarch_pop_frame (gdbarch, arm_pop_frame);
/* Address manipulation. */
next parent reply other threads:[~2002-11-27 18:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200211270917.gAR9HNE29771@pc960.cambridge.arm.com>
2002-11-27 10:43 ` Andrew Cagney [this message]
2002-11-28 1:26 ` Richard Earnshaw
2002-11-28 2:20 ` Andreas Schwab
2002-11-28 2:41 ` Richard Earnshaw
2002-11-28 2:45 ` Andreas Schwab
2002-11-28 2:57 ` Richard Earnshaw
2002-11-28 5:52 ` Keith Walker
2002-11-28 7:34 ` Andrew Cagney
2002-11-28 7:19 ` Andrew Cagney
2002-11-28 8:33 ` Richard Earnshaw
2002-11-28 8:45 ` Andrew Cagney
2002-11-28 8:50 ` Richard Earnshaw
2002-11-28 9:00 ` Andrew Cagney
2003-01-29 5:19 ` Andrew Cagney
2003-01-29 14:50 ` Kris Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DE51241.9040104@redhat.com \
--to=ac131313@redhat.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kewarken@qnx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox