diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-05 15:19:59 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-05 15:19:59 +0000 |
commit | 87805e6373710b71e29a07f9e8a4c3a1e17068da (patch) | |
tree | 759e522a8fe72529aefefe239f8e40679353cf14 /gdb | |
parent | d966045b7b22448c0c4cdfa90eb1afab34d07c46 (diff) | |
download | gdb-87805e6373710b71e29a07f9e8a4c3a1e17068da.zip gdb-87805e6373710b71e29a07f9e8a4c3a1e17068da.tar.gz gdb-87805e6373710b71e29a07f9e8a4c3a1e17068da.tar.bz2 |
* spu-tdep.c (spu_push_dummy_code): New function.
(spu_gdbarch_init): Install it.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/spu-tdep.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a12c36..2fc0895 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com> + * spu-tdep.c (spu_push_dummy_code): New function. + (spu_gdbarch_init): Install it. + +2008-09-05 Ulrich Weigand <uweigand@de.ibm.com> + * gdbarch.sh (gdbarch_dump): Use core_addr_to_string_nz instead of paddr_nz. * gdbarch.c: Regenerate. diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 614bfdc..e68b228 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -1032,6 +1032,22 @@ spu_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) return sp & ~15; } +static CORE_ADDR +spu_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, + struct value **args, int nargs, struct type *value_type, + CORE_ADDR *real_pc, CORE_ADDR *bp_addr, + struct regcache *regcache) +{ + /* Allocate space sufficient for a breakpoint, keeping the stack aligned. */ + sp = (sp - 4) & ~15; + /* Store the address of that breakpoint */ + *bp_addr = sp; + /* The call starts at the callee's entry point. */ + *real_pc = funaddr; + + return sp; +} + static int spu_scalar_value_p (struct type *type) { @@ -2108,6 +2124,7 @@ spu_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_location (gdbarch, ON_STACK); set_gdbarch_frame_align (gdbarch, spu_frame_align); set_gdbarch_frame_red_zone_size (gdbarch, 2000); + set_gdbarch_push_dummy_code (gdbarch, spu_push_dummy_code); set_gdbarch_push_dummy_call (gdbarch, spu_push_dummy_call); set_gdbarch_dummy_id (gdbarch, spu_dummy_id); set_gdbarch_return_value (gdbarch, spu_return_value); |