From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28586 invoked by alias); 24 Jul 2006 21:05:48 -0000 Received: (qmail 28578 invoked by uid 22791); 24 Jul 2006 21:05:47 -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; Mon, 24 Jul 2006 21:05:44 +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 k6OL5bIN002016; Mon, 24 Jul 2006 14:05:39 -0700 From: Fred Fish Reply-To: fnf@diveadx.com To: GDB Patches Subject: [PATCH] Fix inconsistent usage of FRAME_OBSTACK_ZALLOC macro Date: Mon, 24 Jul 2006 21:05:00 -0000 User-Agent: KMail/1.9.3 Cc: fnf@diveadx.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607241705.37217.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/msg00360.txt.bz2 Of the 50+ places that reference frame_obstack_zalloc(), about 50 of them use the FRAME_OBSTACK_ZALLOC macro. The rest call the function directly. This patch makes them all consistently use the macro. -Fred 2006-07-24 Fred Fish * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Use FRAME_OBSTACK_ZALLOC instead of calling frame_obstack_zalloc directly. * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Ditto. * arm-tdep.c (arm_make_prologue_cache): Ditto. (arm_make_stub_cache): Ditto. * frame-unwind.h: Ditto. * frame.c (create_new_frame): Ditto. Index: alpha-mdebug-tdep.c =================================================================== RCS file: /cvsroots/latest/src/gdb/gdb/alpha-mdebug-tdep.c,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 alpha-mdebug-tdep.c --- alpha-mdebug-tdep.c 30 Dec 2005 18:53:02 -0000 1.1.1.2 +++ alpha-mdebug-tdep.c 24 Jul 2006 20:40:13 -0000 @@ -191,7 +191,7 @@ alpha_mdebug_frame_unwind_cache (struct info->proc_desc = proc_desc; gdb_assert (proc_desc != NULL); - info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS); + info->saved_regs = FRAME_OBSTACK_ZALLOC (SIZEOF_FRAME_SAVED_REGS); /* The VFP of the frame is at FRAME_REG+FRAME_OFFSET. */ frame_unwind_unsigned_register (next_frame, PROC_FRAME_REG (proc_desc), &vfp); Index: alpha-tdep.c =================================================================== RCS file: /cvsroots/latest/src/gdb/gdb/alpha-tdep.c,v retrieving revision 1.1.1.5 diff -u -p -r1.1.1.5 alpha-tdep.c --- alpha-tdep.c 11 Jul 2006 02:27:20 -0000 1.1.1.5 +++ alpha-tdep.c 24 Jul 2006 20:40:23 -0000 @@ -1011,7 +1011,7 @@ alpha_heuristic_frame_unwind_cache (stru info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache); *this_prologue_cache = info; - info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS); + info->saved_regs = FRAME_OBSTACK_ZALLOC (SIZEOF_FRAME_SAVED_REGS); limit_pc = frame_pc_unwind (next_frame); if (start_pc == 0) 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);