aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsv4-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mipsv4-nat.c')
-rw-r--r--gdb/mipsv4-nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index ec46df6..2695f1f 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -47,8 +47,8 @@ supply_gregset (gregset_t *gregsetp)
{
register int regi;
register greg_t *regp = &(*gregsetp)[0];
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
for (regi = 0; regi <= CXT_RA; regi++)
supply_register (regi, (char *) (regp + regi));
@@ -102,8 +102,8 @@ void
supply_fpregset (fpregset_t *fpregsetp)
{
register int regi;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
for (regi = 0; regi < 32; regi++)
supply_register (FP0_REGNUM + regi,