[PATCH] Remove bogosities from dwarf2cfi.c:cfi_pop_frame()

Mark Kettenis
2002-07-07T21:44:57Z

Using alloca() here is pretty obvious. I discussed the other fix with
Michael Ludvig.

Checked in.

Mark

Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>

* dwarf2cfi.c (cfi_pop_frame): Use alloca() for regbuf.
Don't call get_current_frame().

Index: dwarf2cfi.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
retrieving revision 1.11
diff -u -p -r1.11 dwarf2cfi.c
--- dwarf2cfi.c 21 Jun 2002 13:53:24 -0000 1.11
+++ dwarf2cfi.c 4 Jul 2002 14:40:22 -0000
@@ -1757,10 +1757,8 @@ cfi_write_fp (CORE_ADDR val)
void
cfi_pop_frame (struct frame_info *fi)
{
- char regbuf[MAX_REGISTER_RAW_SIZE];
+ char *regbuf = alloca (MAX_REGISTER_RAW_SIZE);
int regnum;
-
- fi = get_current_frame ();

for (regnum = 0; regnum < NUM_REGS; regnum++)
{