2001-05-16 Michael Snyder <msnyder@redhat.com>

* infcmd.c (do_registers_info): Move alloca outside of loop.
This commit is contained in:
Michael Snyder 2001-05-16 20:05:49 +00:00
parent 31b6fca668
commit b8adfa9f55
2 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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)
{