aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-05-16 20:05:49 +0000
committerMichael Snyder <msnyder@vmware.com>2001-05-16 20:05:49 +0000
commitb8adfa9f55a9629eb28ddbfc8b06c25a25c41444 (patch)
tree12f86352f23e82a25430ba8e355cfb8ee75f7999 /gdb/infcmd.c
parent31b6fca668a517baff6e56246980ecafd1824d1f (diff)
downloadgdb-b8adfa9f55a9629eb28ddbfc8b06c25a25c41444.zip
gdb-b8adfa9f55a9629eb28ddbfc8b06c25a25c41444.tar.gz
gdb-b8adfa9f55a9629eb28ddbfc8b06c25a25c41444.tar.bz2
2001-05-16 Michael Snyder <msnyder@redhat.com>
* infcmd.c (do_registers_info): Move alloca outside of loop.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 0309464..0831d7c 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)
{