This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[committed, spu] Use ON_STACK call dummy location
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 8 Mar 2007 22:32:52 +0100 (CET)
- Subject: [committed, spu] Use ON_STACK call dummy location
Hello,
this patch switches spu-tdep.c to use the ON_STACK call dummy location.
This doesn't really matter for the stand-alone SPU debugger, but it is
required for the combined debugger (as the "entry point" is on the PPU
side in that case, and thus cannot be used as call dummy break point).
Tested on spu-elf, committed to mainline.
Bye,
Ulrich
ChangeLog:
* spu-tdep.c (spu_frame_align): New function.
(spu_gdbarch_init): Install it. Set call dummy location to ON_STACK.
Index: gdb/spu-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/spu-tdep.c,v
retrieving revision 1.8
diff -u -p -r1.8 spu-tdep.c
--- gdb/spu-tdep.c 8 Mar 2007 21:18:01 -0000 1.8
+++ gdb/spu-tdep.c 8 Mar 2007 21:19:42 -0000
@@ -756,6 +756,12 @@ spu_write_pc (CORE_ADDR pc, ptid_t ptid)
/* Function calling convention. */
+static CORE_ADDR
+spu_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+ return sp & ~15;
+}
+
static int
spu_scalar_value_p (struct type *type)
{
@@ -1079,6 +1085,8 @@ spu_gdbarch_init (struct gdbarch_info in
set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
/* Inferior function calls. */
+ set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+ set_gdbarch_frame_align (gdbarch, spu_frame_align);
set_gdbarch_push_dummy_call (gdbarch, spu_push_dummy_call);
set_gdbarch_unwind_dummy_id (gdbarch, spu_unwind_dummy_id);
set_gdbarch_return_value (gdbarch, spu_return_value);
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com