From 6789195b4218084c38719f3c44e09eaa8108fc12 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sun, 2 Feb 2003 05:46:14 +0000 Subject: 2003-02-02 Andrew Cagney * mips-nat.c (zerobuf): Delete. (fetch_inferior_registers): Alloc local zerobuf. (fetch_core_registers): Alloc local zerobuf. * d10v-tdep.c (show_regs): Don't allocate a dynamic array using MAX_REGISTER_RAW_SIZE or MAX_REGISTER_VIRTUAL_SIZE. * thread-db.c (thread_db_store_registers): Ditto. * sh-tdep.c (sh_do_register): Ditto. * rom68k-rom.c (rom68k_supply_one_register): Ditto. * remote-sim.c (gdbsim_store_register): Ditto. * remote-mips.c (mips_wait, mips_fetch_registers): Ditto. * remote-e7000.c (fetch_regs_from_dump): Ditto. * monitor.c (monitor_supply_register): Ditto. * mipsv4-nat.c (supply_gregset, supply_fpregset): Ditto. * mips-nat.c (fetch_inferior_registers): Ditto. * m68klinux-nat.c (fetch_register): Ditto. * lynx-nat.c (fetch_inferior_registers): Ditto. (fetch_inferior_registers): Ditto. * irix4-nat.c (supply_gregset, supply_fpregset): Ditto. * hpux-thread.c (hpux_thread_fetch_registers): Ditto. (hpux_thread_store_registers): Ditto. * hppah-nat.c (fetch_register): Ditto. * hppab-nat.c (fetch_register): Ditto. * hppa-tdep.c (pa_register_look_aside): Ditto. (pa_print_fp_reg, pa_strcat_fp_reg): Ditto. * dve3900-rom.c (fetch_bitmapped_register): Ditto. --- gdb/irix4-nat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/irix4-nat.c') diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c index 2283887..b44c5bb 100644 --- a/gdb/irix4-nat.c +++ b/gdb/irix4-nat.c @@ -51,8 +51,8 @@ supply_gregset (gregset_t *gregsetp) { register int regi; register greg_t *regp = (greg_t *) (gregsetp->gp_regs); - static char zerobuf[MAX_REGISTER_RAW_SIZE] = - {0}; + char *zerobuf = alloca (max_register_size (current_gdbarch)); + memset (zerobuf, 0, max_register_size (current_gdbarch)); /* FIXME: somewhere, there should be a #define for the meaning of this magic number 32; we should use that. */ @@ -104,8 +104,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, -- cgit v1.1