aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-10-01 15:55:14 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-10-01 15:55:14 +0000
commit49a45ecfd229b6ed70c9c816e143995e8d9e0bb2 (patch)
tree8e074095cc87baf9ad109894ba267dbd7dc9a775 /gdb/sparc-tdep.c
parentbacff3ab9ca8b5f171823f2659f44770c594710f (diff)
downloadgdb-49a45ecfd229b6ed70c9c816e143995e8d9e0bb2.zip
gdb-49a45ecfd229b6ed70c9c816e143995e8d9e0bb2.tar.gz
gdb-49a45ecfd229b6ed70c9c816e143995e8d9e0bb2.tar.bz2
[sparc] inferior SEGV while calling Ada subprogram
gdb/ChangeLog: * sparc-tdep.c (sparc32_frame_align): New function. (sparc32_gdbarch_init): Set the frame_align gdbarch method. * sparc64-tdep.c (sparc64_frame_align): New function. (sparc64_gdbarch_init): Set the frame_align gdbarch method.
Diffstat (limited to 'gdb/sparc-tdep.c')
-rw-r--r--gdb/sparc-tdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 29a12cf..fd70783 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -399,6 +399,13 @@ sparc32_pseudo_register_write (struct gdbarch *gdbarch,
static CORE_ADDR
+sparc32_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
+{
+ /* The ABI requires double-word alignment. */
+ return address & ~0x7;
+}
+
+static CORE_ADDR
sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
CORE_ADDR funcaddr,
struct value **args, int nargs,
@@ -1407,6 +1414,7 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fp0_regnum (gdbarch, SPARC_F0_REGNUM); /* %f0 */
/* Call dummy code. */
+ set_gdbarch_frame_align (gdbarch, sparc32_frame_align);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_push_dummy_code (gdbarch, sparc32_push_dummy_code);
set_gdbarch_push_dummy_call (gdbarch, sparc32_push_dummy_call);