diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-10-01 15:55:14 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-10-01 15:55:14 +0000 |
commit | 49a45ecfd229b6ed70c9c816e143995e8d9e0bb2 (patch) | |
tree | 8e074095cc87baf9ad109894ba267dbd7dc9a775 /gdb/sparc64-tdep.c | |
parent | bacff3ab9ca8b5f171823f2659f44770c594710f (diff) | |
download | binutils-gdb-49a45ecfd229b6ed70c9c816e143995e8d9e0bb2.tar.gz |
[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/sparc64-tdep.c')
-rw-r--r-- | gdb/sparc64-tdep.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 3cd6109f90a..ca89b8c9fd3 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -938,6 +938,13 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, } static CORE_ADDR +sparc64_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) +{ + /* The ABI requires 16-byte alignment. */ + return address & ~0xf; +} + +static CORE_ADDR sparc64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, @@ -1136,6 +1143,7 @@ sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_pc_regnum (gdbarch, SPARC64_PC_REGNUM); /* %pc */ /* Call dummy code. */ + set_gdbarch_frame_align (gdbarch, sparc64_frame_align); set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT); set_gdbarch_push_dummy_code (gdbarch, NULL); set_gdbarch_push_dummy_call (gdbarch, sparc64_push_dummy_call); |