summaryrefslogtreecommitdiff
path: root/gdb/remote-mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-mips.c')
-rw-r--r--gdb/remote-mips.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index d1e3705a4c8..17994f9d4da 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1791,7 +1791,7 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
&rpc, &rfp, &rsp, flags);
if (nfields >= 3)
{
- char buf[MAX_REGISTER_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
store_unsigned_integer (buf, REGISTER_RAW_SIZE (PC_REGNUM), rpc);
supply_register (PC_REGNUM, buf);
@@ -1972,7 +1972,7 @@ mips_fetch_registers (int regno)
}
{
- char buf[MAX_REGISTER_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */