This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Move alloca outside of loop.
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH] Move alloca outside of loop.
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Wed, 16 May 2001 11:26:53 -0700
- Organization: Red Hat
2001-05-16 Michael Snyder <msnyder@redhat.com>
* infcmd.c (do_registers_info): Move alloca outside of loop.
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.27
diff -c -3 -p -r1.27 infcmd.c
*** infcmd.c 2001/05/04 04:15:25 1.27
--- infcmd.c 2001/05/16 17:59:26
*************** do_registers_info (int regnum, int fpreg
*** 1467,1478 ****
{
register int i;
int numregs = NUM_REGS + NUM_PSEUDO_REGS;
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)
{
--- 1467,1477 ----
{
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++)
{
/* Decide between printing all regs, nonfloat regs, or specific reg. */
if (regnum == -1)
{