From: Michael Snyder Date: Wed, 16 May 2001 20:05:49 +0000 (+0000) Subject: 2001-05-16 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8adfa9f55a9629eb28ddbfc8b06c25a25c41444;p=binutils-gdb.git 2001-05-16 Michael Snyder * infcmd.c (do_registers_info): Move alloca outside of loop. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2b2bfad0955..52ebee9e82b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2001-05-16 Michael Snyder + + * infcmd.c (do_registers_info): Move alloca outside of loop. + 2001-05-15 Mark Kettenis * sparc-tdep.c (sparc_gdbarch_init): Get the architecture from diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 030946495d1..0831d7c27d2 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1467,12 +1467,11 @@ do_registers_info (int regnum, int fpregs) { register int i; int numregs = NUM_REGS + NUM_PSEUDO_REGS; + char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE); + char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE); for (i = 0; i < numregs; i++) { - char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE); - char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE); - /* Decide between printing all regs, nonfloat regs, or specific reg. */ if (regnum == -1) {