From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1288 invoked by alias); 7 Jul 2002 21:44:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1251 invoked from network); 7 Jul 2002 21:44:51 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.114.42) by sources.redhat.com with SMTP; 7 Jul 2002 21:44:51 -0000 Received: (from kettenis@localhost) by walton.kettenis.dyndns.org (8.11.6/8.11.6) id g67LioR02326; Sun, 7 Jul 2002 23:44:50 +0200 (CEST) (envelope-from kettenis) From: Mark Kettenis Message-Id: <200207072144.g67LioR02326@walton.kettenis.dyndns.org> Date: Mon, 08 Jul 2002 05:24:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] Remove bogosities from dwarf2cfi.c:cfi_pop_frame() X-SW-Source: 2002-07/txt/msg00109.txt.bz2 Using alloca() here is pretty obvious. I discussed the other fix with Michael Ludvig. Checked in. Mark Index: ChangeLog from Mark Kettenis * 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++) {