aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
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')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/infcmd.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2b2bfad..52ebee9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2001-05-16 Michael Snyder <msnyder@redhat.com>
+
+ * infcmd.c (do_registers_info): Move alloca outside of loop.
+
2001-05-15 Mark Kettenis <kettenis@gnu.org>
* sparc-tdep.c (sparc_gdbarch_init): Get the architecture from
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)
{