From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20573 invoked by alias); 25 Jul 2006 12:17:27 -0000 Received: (qmail 20560 invoked by uid 22791); 25 Jul 2006 12:17:26 -0000 X-Spam-Check-By: sourceware.org Received: from public.ninemoons.com (HELO public.ninemoons.com) (24.248.2.174) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Jul 2006 12:17:24 +0000 Received: from [::1] (public.ninemoons.com [24.248.2.174] (may be forged)) by public.ninemoons.com (8.13.7/8.13.4) with ESMTP id k6PCGgvE020574; Tue, 25 Jul 2006 05:16:45 -0700 From: Fred Fish Reply-To: fnf@diveadx.com To: Daniel Jacobowitz Subject: Re: [PATCH] Fix inconsistent usage of FRAME_OBSTACK_ZALLOC macro Date: Tue, 25 Jul 2006 12:17:00 -0000 User-Agent: KMail/1.9.3 Cc: GDB Patches References: <200607241705.37217.fnf@ninemoons.com> <20060724211008.GA18103@nevyn.them.org> In-Reply-To: <20060724211008.GA18103@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607250816.38307.fnf@ninemoons.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00384.txt.bz2 Here is a revised patch with the alpha bits removed. -Fred 2006-07-24 Fred Fish * arm-tdep.c (arm_make_prologue_cache): Use FRAME_OBSTACK_ZALLOC instead of calling frame_obstack_zalloc directly. (arm_make_stub_cache): Ditto. * frame-unwind.h: Ditto. * frame.c (create_new_frame): Ditto. Index: arm-tdep.c =================================================================== RCS file: /cvsroots/latest/src/gdb/gdb/arm-tdep.c,v retrieving revision 1.1.1.11 diff -u -p -r1.1.1.11 arm-tdep.c --- arm-tdep.c 23 Jul 2006 08:47:10 -0000 1.1.1.11 +++ arm-tdep.c 24 Jul 2006 20:33:42 -0000 @@ -855,7 +855,7 @@ arm_make_prologue_cache (struct frame_in struct arm_prologue_cache *cache; CORE_ADDR unwound_fp; - cache = frame_obstack_zalloc (sizeof (struct arm_prologue_cache)); + cache = FRAME_OBSTACK_ZALLOC (struct arm_prologue_cache); cache->saved_regs = trad_frame_alloc_saved_regs (next_frame); arm_scan_prologue (next_frame, cache); @@ -962,7 +962,7 @@ arm_make_stub_cache (struct frame_info * struct arm_prologue_cache *cache; CORE_ADDR unwound_fp; - cache = frame_obstack_zalloc (sizeof (struct arm_prologue_cache)); + cache = FRAME_OBSTACK_ZALLOC (struct arm_prologue_cache); cache->saved_regs = trad_frame_alloc_saved_regs (next_frame); cache->prev_sp = frame_unwind_register_unsigned (next_frame, ARM_SP_REGNUM); Index: frame-unwind.h =================================================================== RCS file: /cvsroots/latest/src/gdb/gdb/frame-unwind.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 frame-unwind.h --- frame-unwind.h 30 Dec 2005 18:53:03 -0000 1.1.1.2 +++ frame-unwind.h 24 Jul 2006 20:39:49 -0000 @@ -72,7 +72,7 @@ typedef int (frame_sniffer_ftype) (const THIS_PROLOGUE_CACHE can be used to share any prolog analysis data with the other unwind methods. Memory for that cache should be - allocated using frame_obstack_zalloc(). */ + allocated using FRAME_OBSTACK_ZALLOC(). */ typedef void (frame_this_id_ftype) (struct frame_info *next_frame, void **this_prologue_cache, @@ -108,7 +108,7 @@ typedef void (frame_this_id_ftype) (stru THIS_PROLOGUE_CACHE can be used to share any prolog analysis data with the other unwind methods. Memory for that cache should be - allocated using frame_obstack_zalloc(). */ + allocated using FRAME_OBSTACK_ZALLOC(). */ typedef void (frame_prev_register_ftype) (struct frame_info *next_frame, void **this_prologue_cache, Index: frame.c =================================================================== RCS file: /cvsroots/latest/src/gdb/gdb/frame.c,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 frame.c --- frame.c 30 Dec 2005 18:53:17 -0000 1.1.1.2 +++ frame.c 24 Jul 2006 20:33:42 -0000 @@ -946,7 +946,7 @@ create_new_frame (CORE_ADDR addr, CORE_A paddr_nz (addr), paddr_nz (pc)); } - fi = frame_obstack_zalloc (sizeof (struct frame_info)); + fi = FRAME_OBSTACK_ZALLOC (struct frame_info); fi->next = create_sentinel_frame (current_regcache);