aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-03-08 14:22:47 +0000
committerPaul Brook <paul@codesourcery.com>2006-03-08 14:22:47 +0000
commitf53f0d0bde592682b363c703b68166408c6552d1 (patch)
treed3e267b86ed7b15a46b3365dad8afe040d11be6d /gdb
parentb5678df9a4ab084a28c5757ddfd6a8fe02f58251 (diff)
downloadgdb-f53f0d0bde592682b363c703b68166408c6552d1.zip
gdb-f53f0d0bde592682b363c703b68166408c6552d1.tar.gz
gdb-f53f0d0bde592682b363c703b68166408c6552d1.tar.bz2
2006-03-08 Paul Brook <paul@codesourcery.com>
* arm-tdep.c (arm_push_dummy_call): Remove stack alignment. (arm_frame_align): New function. (arm_gdbarch_init): Use it.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/arm-tdep.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a9fac38..d08c9b2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-08 Paul Brook <paul@codesourcery.com>
+
+ * arm-tdep.c (arm_push_dummy_call): Remove stack alignment.
+ (arm_frame_align): New function.
+ (arm_gdbarch_init): Use it.
+
2006-03-03 Khem Raj <khem@mvista.com>
* remote-rdp.c (remote_rdp_xfer_inferior_memory): Use gdb_byte.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 652be4b..cb3c261 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1173,11 +1173,6 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
argreg = ARM_A1_REGNUM;
nstack = 0;
- /* Some platforms require a double-word aligned stack. Make sure sp
- is correctly aligned before we start. We always do this even if
- it isn't really needed -- it can never hurt things. */
- sp &= ~(CORE_ADDR)(2 * DEPRECATED_REGISTER_SIZE - 1);
-
/* The struct_return pointer occupies the first parameter
passing register. */
if (struct_return)
@@ -1299,6 +1294,17 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
return sp;
}
+
+/* Always align the frame to an 8-byte boundary. This is required on
+ some platforms and harmless on the rest. */
+
+static CORE_ADDR
+arm_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+ /* Align the stack to eight bytes. */
+ return sp & ~ (CORE_ADDR) 7;
+}
+
static void
print_fpu_flags (int flags)
{
@@ -2738,6 +2744,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->jb_pc = -1; /* Longjump support not enabled by default. */
set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
+ set_gdbarch_frame_align (gdbarch, arm_frame_align);
set_gdbarch_write_pc (gdbarch, arm_write_pc);