This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Remove bogosities from dwarf2cfi.c:cfi_pop_frame()
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 4 Jul 2002 16:44:10 +0200 (CEST)
- Subject: [PATCH] Remove bogosities from dwarf2cfi.c:cfi_pop_frame()
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++)
{