From b8adfa9f55a9629eb28ddbfc8b06c25a25c41444 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Wed, 16 May 2001 20:05:49 +0000 Subject: [PATCH] 2001-05-16 Michael Snyder * infcmd.c (do_registers_info): Move alloca outside of loop. --- gdb/ChangeLog | 4 ++++ gdb/infcmd.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2b2bfad095..52ebee9e82 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 030946495d..0831d7c27d 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) { -- 2.34.1