This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix inconsistent usage of FRAME_OBSTACK_ZALLOC macro


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]