summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/spu-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/spu-low.c')
-rw-r--r--gdb/gdbserver/spu-low.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index a110a0e76ff..878ed82cf0e 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -147,7 +147,7 @@ fetch_ppc_memory (CORE_ADDR memaddr, char *myaddr, int len)
int tid = ptid_get_lwp (current_ptid);
- buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET));
+ buffer = XALLOCAVEC (PTRACE_TYPE_RET, count);
for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
if ((ret = fetch_ppc_memory_1 (tid, addr, &buffer[i])) != 0)
return ret;
@@ -172,7 +172,7 @@ store_ppc_memory (CORE_ADDR memaddr, char *myaddr, int len)
int tid = ptid_get_lwp (current_ptid);
- buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET));
+ buffer = XALLOCAVEC (PTRACE_TYPE_RET, count);
if (addr != memaddr || len < (int) sizeof (PTRACE_TYPE_RET))
if ((ret = fetch_ppc_memory_1 (tid, addr, &buffer[0])) != 0)