Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fred Fish <fnf@ninemoons.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] Fix inconsistent usage of FRAME_OBSTACK_ZALLOC macro
Date: Tue, 25 Jul 2006 12:17:00 -0000	[thread overview]
Message-ID: <200607250816.38307.fnf@ninemoons.com> (raw)
In-Reply-To: <20060724211008.GA18103@nevyn.them.org>

Here is a revised patch with the alpha bits removed.

-Fred

2006-07-24  Fred Fish  <fnf@specifix.com>

	* 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);
 


  parent reply	other threads:[~2006-07-25 12:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 21:05 Fred Fish
2006-07-24 21:10 ` Daniel Jacobowitz
2006-07-24 21:31   ` Fred Fish
2006-07-25 12:17   ` Fred Fish [this message]
2006-07-25 12:21     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607250816.38307.fnf@ninemoons.com \
    --to=fnf@ninemoons.com \
    --cc=drow@false.org \
    --cc=fnf@diveadx.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox