This is the mail archive of the gdb-patches@sources.redhat.com 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]

[commit, 6.0] Fix xmalloc frame foobar


This [should] fix a breakage in the deprecated frame xmalloc method - it was allocating from the wrong heap :-(

committed to 6.0 and mainline.

Andrew
2003-08-12  Andrew Cagney  <cagney@redhat.com>

	* frame.c (deprecated_frame_xmalloc): Use XMALLOC, instead of
	FRAME_OBSTACK_ZALLOC.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.136
diff -u -r1.136 frame.c
--- frame.c	10 Aug 2003 14:56:23 -0000	1.136
+++ frame.c	12 Aug 2003 17:44:29 -0000
@@ -2279,7 +2279,8 @@
 struct frame_info *
 deprecated_frame_xmalloc (void)
 {
-  struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
+  struct frame_info *frame = XMALLOC (struct frame_info);
+  memset (frame, 0, sizeof (*frame));
   frame->this_id.p = 1;
   return frame;
 }

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